curry and compose -- functional language constructs

Nick Perkins nperkins7 at
Wed May 2 04:22:30 EDT 2001

How about using curry for an
instant callback with parameters?

from curry import curry
    def chg_color(newcolor):
        color = newcolor

    bb = Button(root,
                command = curry(chg_color, 'blue'))

    rb = Button(root,
                command = curry(chg_color, 'red'))


More information about the Python-list mailing list