[Python-Dev] Weakref design questions (original) (raw)
Brian Quinlan brian@sweetapp.com
Fri, 18 Oct 2002 20:54:45 -0700
- Previous message: [Python-Dev] Weakref design questions
- Next message: [Python-Dev] Weakref design questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Martin wrote:
You don't have to add it to every method. You can perform the check in tpgetattro before performing the method lookup.
That would be dangerous! See my original "more evil" example.
Alternatively, you can change the obtype 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
- Previous message: [Python-Dev] Weakref design questions
- Next message: [Python-Dev] Weakref design questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]