On Aug 15, 2004, at 11:45 PM, Jack Diederich wrote: > My patch to add support for class decorators defines func before the > decorators as a side effect of moving Mark's decorator code out of > com_funcdef (and yes, that was a plug). That's definitely worse. It causes a possibly incorrect temporary value to be bound, even if only for a short amount of time. The current behavior of only doing the store after executing the decorators is cleaner. I'd rewrite the translation as: """ The following code: @f1(arg) @f2 def func(): return True is nearly* equivalent to: func = f1(arg)(f2(lambda : True)) * However, you don't have the syntactical restrictions of a lambda, and the function name gets set to "func" instead of "<lambda>". """ James
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4