waving android

I am currently a software engineer at Google, where as a member of the Android platform team I build frameworks and user interfaces.

The blog here at is mostly historical; you can find more recent posts on .

currying with Python object methods

December 2nd, 2002

Today’s Python codesnippet (actually from Nov. 14th, but the mail daemon got in the way) courtesy yours truly:

# objcurry: called with an object and
# the name of a method, will return
# a standalone function that can be
# called at any time (as if it were
# still connected to its object).
# (requires python2.2 or later)
def objcurry(object, methodname):
    def curried(*args, **kargs):
        apply(getattr(object,methodname), args, kargs)
    return curried
newer: older: