Re: curry and compose -- functional language constructs
by Nick Perkins other posts by this author
May 2 2001 4:30PM messages near this date
Re: curry and compose -- functional language constructs
|
Re: curry and compose -- functional language constructs
How about using curry for an
instant callback with parameters?
from curry import curry
...
def chg_color(newcolor):
color = newcolor
bb = Button(root,
text='Blue',
command = curry(chg_color, 'blue'))
rb = Button(root,
text='Red',
command = curry(chg_color, 'red'))
...
--
http://mail.python.org/mailman/listinfo/python-list
Thread:
Nick Perkins
Roman Suzi
Marcin 'Qrczak' Kowalczyk
Alex Martelli
Nick Perkins
Doug Fort
Ben Wolfson
|