On Thu, 2004-02-26 at 18:43, Delaney, Timothy C (Timothy) wrote: > This isn't too bad. Probably better with a wrapper around sys.atexit - > something like: > > def atexit (func): > sys.atexit(func) > return func > > def cleanup() [atexit]: > > otherwise it's not obvious that cleanup gets bound to None. Perhaps it > should be a requirement of decorators that they return something other > than None, and an exception is thrown if this contract is broken? Would it be better if it returned 1? <wink> Just what /is/ the contract for a decorator function? Maybe that it takes a function/method object and must return a descriptor? I do think this needs some clarification in the PEP. -Barry
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