On Thu, Aug 21, 2014 at 7:25 PM, luofeiyu <elearn2...@gmail.com> wrote: > >>> c2.d.a > __get__() is called <__main__.C2 object at 0x000000000297BE10> <class '__main__. > C2'> > __getattribute__() is called > 'abc' > > Why the result of c2.d.a is not : > > __get__() is called <__main__.C2 object at 0x000000000297BE10> <class '__main__. > C2'> > __getattribute__() is called > 'abc'
As far as I can tell you pasted the same output twice, so I don't understand what it is that you're asking. > Why the` return self` in the __get__ method in class C does not work? It does work. When you type "c2.d" above, the result was the C instance, i.e. self.
-- https://mail.python.org/mailman/listinfo/python-list