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/2002-October/029687.html below:

[Python-Dev] Weakref design questions

[Python-Dev] Weakref design questions [Python-Dev] Weakref design questionsBrian Quinlan brian@sweetapp.com
Fri, 18 Oct 2002 20:54:45 -0700
Martin wrote:
> You don't have to add it to every method. You can perform the check in
> tp_getattro before performing the method lookup. 

That would be dangerous! See my original "more evil" example. 

> Alternatively, you can change the ob_type of the object to simply drop

> the methods that are not available anymore.

I like this strategy! But I still think that this is more painful/less
elegant than using proxies.

Cheers,
Brian




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