On Fri, Jun 28, 2019 at 3:55 AM Steven D'Aprano <st...@pearwood.info> wrote:
>
> On Fri, Jun 28, 2019 at 02:44:28AM +1000, Chris Angelico wrote:
>
> > If it's ALWAYS called, then it's almost useless. The wrapper object
> > will vanish the moment you attempt to do anything with it, devolving
> > instantly to the result of getself.
>
> I don't understand why it is useless. If the wrapper object is no longer
> needed, then getself will return the object which is needed, and the
> wrapper is superfluous and should be garbage collected.
>
> If the wrapper object is needed, then getself will return self, and it
> won't disappear.
>
> Are we talking past each other?
>

Without any magic, merely attempting to return the wrapper would cause
it to collapse to the underlying object (by calling getself).
Therefore, the proposal - to be at all useful - has to have some form
of magic to decide whether touching the object gives you the wrapper
or calls getself. It's fundamental to the proposal that it be magical.

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/LMSF3X5NF2RHNS2YDNIWZLWKH6TTB4TU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to