On Fri, Jun 28, 2019 at 03:59:14AM +1000, Chris Angelico wrote:
> > 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).
Yeah, definitely talking past each other.
Let's get concrete:
class Spam:
def __getself__(self):
print("I can has side-effects!!!")
return self
x = Spam()
x # Calls __getself__
What are you calling "the wrapper" and "the underlying object"?
--
Steven
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/4FICPPB4MJW2REAGVPBPFZF6ZYRCTPQ5/
Code of Conduct: http://python.org/psf/codeofconduct/