Over a million developers have joined DZone.

Python Curry Implementation

DZone's Guide to

Python Curry Implementation

· ·
Free Resource
# Generalized version of curry, works w/ keywords too...  snarfed original version
# from somewhere else ages ago, much simpler / cleaner than other implementations

curry = lambda func, *args, **kw:\
            lambda *p, **n:\
                 func(*args + p, **dict(kw.items() + n.items()))

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}