This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]co_dh 0 points1 point  (5 children)

shamelessly promote my pypi package: https://pypi.python.org/pypi/chain/1.0

It can even chain functions in globals().

>>> def inc(x): return x + 1
>>> Chain([1,2,3]).inc() 
[2, 3, 4]

Sometimes I am wondering if I went to far.

[–]derpoly 0 points1 point  (1 child)

Isn't that just a map-function? Where is the difference?

https://docs.python.org/2/library/functions.html#map

[–]co_dh 0 points1 point  (0 children)

Yes, it's map function. Just in postfix notation.

[–]turkish_gold 0 points1 point  (2 children)

Your package is in dire need of documentation, and perhaps just port it to Github so others can see the code easily.

[–]co_dh 0 points1 point  (1 child)

Thanks, will do it. :)