Skip to main content

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()
list.zip()
list.min()
list.max()
list.sum()
list.reduce(function)
list.reduce(initial, function)

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.7.0.tar.gz (1.8 kB view details)

Uploaded Source

File details

Details for the file omakase-0.7.0.tar.gz.

File metadata

  • Download URL: omakase-0.7.0.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.4.2 requests/2.9.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.10

File hashes

Hashes for omakase-0.7.0.tar.gz
Algorithm Hash digest
SHA256 0ef836033d9c90a5e6d2232ab4bc2cc322a8e6d5dcc087f9ebe441577fdaa912
MD5 39634ae9df20fb35c57e346b4425f765
BLAKE2b-256 29d986169b5fa3f0892d6f850820605bb4f797aa13508c9fcef22a6b70b3fff8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page