On Thu, Jun 27, 2019 at 6:50 AM Yanghao Hua <yanghao.py@gmail.com> wrote:
On Wed, Jun 26, 2019 at 10:16 PM Chris Angelico <rosuav@gmail.com> wrote:
Let's suppose that frob() returns something that has a __getself__ method. Will f1 trigger its call? Will f2? If the answer is "yes" to both, then when ISN'T getself called? If the answer is "no" to both,
What's the problem for the "yes" case? If you define such an object of course __get/setself__() is always called, and f1() is still equal to f2().
Then in what circumstances will getself NOT be called? What is the point of having an object, if literally every reference to it will result in something else being used? The moment you try to return this object anywhere or do literally anything with it, it will devolve to the result of getself, and the original object is gone. ChrisA