boost.lambda like function generator
Project description
boost.lambda like function generator
Usage:
>>> from pyexpression import _1, _2, _3, if_ >>> _1 * 10 <pyexpression.expressions.FuncCall object at 0xb74db7cc> >>> (_1 * 10)(5) 50 >>> (_1 * _2)(10, 10) 100 >>> map(_1[0], zip(range(10), range(10,20))) >>> class Test(object): ... def __init__(self): ... self.x = 10 ... >>> (_1.x)(Test()) 10 >>> x = if_(_1)[_2].else_[_3] >>> x(True, 10, 20) ... 10 >>> x(False, 10, 20) ... 20
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
pyexpression-0.1.0.tar.gz
(3.8 kB
view details)
File details
Details for the file pyexpression-0.1.0.tar.gz.
File metadata
- Download URL: pyexpression-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfeba05e5ec4f019937c5dfe892dbe2ffb6e4b10153fcf11f72c5355a017f89a
|
|
| MD5 |
7429d6744a0f79d95905b26bbb4e6a82
|
|
| BLAKE2b-256 |
1c49d2cf2b2725544e80b8a821047d2e0ede01a581552f3cb6fe5e7fb5cc8025
|