ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved