Iterable processing functions
Project description
Installation
$ pip install les_iterables
Examples
A collection of utility functions for processing iterable series which aren't in itertools or more-itertools. Some are little more than simple aliases with less confusing names.
>>> from les_iterables import *
>>> is_odd = lambda x: x%2 != 0
>>>
>>> list(retain_if(is_odd, range(10))
[1, 3, 5, 7, 9]
>>>
>>> list(reject_if(is_odd, range(10))
[0, 2, 4, 6, 8]
>>>
>>> list(retain_truthy(reject_if(is_odd, range(10)))
[2, 4, 6, 8]
CI/CD
$ bumpversion patch
$ git push --follow-tags
MIT License
Copyright (c) 2020 Sixty North AS
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for les_iterables-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c8b0830878684d5858efd1886c9429ac94a3b0450e5c41b5257ef5a44f89fae |
|
MD5 | ac82ceeacd071d0821bbfe643d0a644b |
|
BLAKE2b-256 | 24852f788caff71a1f91a4b0adf2ec49db2471dda9c880df149cb48d8bdb8546 |