At 01:26 PM 6/28/2007 -0400, Phillip J. Eby wrote: >You should also be able to delete unwanted function type attributes >like this:: > > from types import FunctionType > del dictionary_of(FunctionType)['func_closure'] > del dictionary_of(FunctionType)['func_code'] By the way, you probably want to also delete func_globals and func_defaults, as there are security ramifications to those attributes as well. Probably not so much for func_dict/__dict__ though. And of course, for Python<=2.4 you can just use the __call__ attribute and not bother with deleting anything but __subclasses__.
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