A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-June/073741.html below:

[Python-Dev] object capability; func_closure; __subclasses__

[Python-Dev] object capability; func_closure; __subclasses__ [Python-Dev] object capability; func_closure; __subclasses__Phillip J. Eby pje at telecommunity.com
Thu Jun 28 19:44:03 CEST 2007
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__.

More information about the Python-Dev mailing list

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