function attributes are like function objects
Barry A. Warsaw
barry at digicool.com
Fri Feb 2 17:41:04 EST 2001
More information about the Python-list mailing list
Fri Feb 2 17:41:04 EST 2001
- Previous message (by thread): function attributes are like function objects
- Next message (by thread): function attributes are like function objects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>>>> "GG" == Geoffrey Gerrietts <geoff at homegain.com> writes: GG> Or are function attributes pretty much accessible only to GG> those who know the function by name? Well, if you have the function passed to you, then you don't need to know what it's called. You just access the attribute. def publish(func): try: if func.publish: print func() except AttributeError: log('Non-conforming function given to publish(): %s' % func) -Barry
- Previous message (by thread): function attributes are like function objects
- Next message (by thread): function attributes are like function objects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list