My personal functions.
Project description
My choice of missing python functions.
list.len() list.map(function) list.filter(function) list.join(separator) list.sortby(function) list.compact() list.freq(function=None) list.groupby(function=None) list.indexby(function=None) list.uniq() list.take(num) list.drop(num) list.first() list.last()
Examples
$ python >>> import omakase >>> array = 'the quick brown fox jumps over the lazy dog'.split() >>> array.map(len) [3, 5, 5, 3, 5, 4, 3, 4, 3] >>> array.filter(lambda each: each > 'hello worlds') ['the', 'quick', 'jumps', 'over', 'the', 'lazy'] >>> array.take(3) ['the', 'quick', 'brown'] >>>
Installation
To install this package, run
pip install omakase
Contributing
Bug reports and pull requests are welcome on github at, https://github.com/akuhn/py-omakase
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
omakase-0.6.2.tar.gz
(1.7 kB
view details)
File details
Details for the file omakase-0.6.2.tar.gz
.
File metadata
- Download URL: omakase-0.6.2.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0bccf900829c6201d344a89b5bbf0519d757fad76cc04065f1d5578e6027133 |
|
MD5 | 75524d41db9474692281edf0cf0979ab |
|
BLAKE2b-256 | f1b73b3109797b75a6c3ace7b2160071a02ab6bde0f70fb2d51791ab6ce466ee |