[Python-Dev] Weakref design questions
Martin v. Loewis
martin@v.loewis.de
19 Oct 2002 08:37:04 +0200
Brian Quinlan <brian@sweetapp.com> writes:
> > I also notice that you rely on the fact that Python code has no
> > way to find out the underlying object of a weak proxy. I think
> > this is a weak assumption - there is no guarantee that this is not
> > possible, or might not be possible in the future.
> This is a concern. If I am mistaken in my assumption, please let me know
> and I will either invent my own proxy type or use the
> check-on-every-method-call technique.
I'm not exactly sure what your assumption is. If it is "in Python 2.3,
there is no way to unwrap a proxy except by writing an extension
module", then your assumption is correct.
If your assumption is "there is a guarantee that there never will be
such mechanism", your assumption is incorrect.
Regards,
Martin