Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #76839 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2014-08-22 22:10 -0600 |
| Last post | 2014-08-22 22:10 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: the output in reference of descriptor. Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-22 22:10 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2014-08-22 22:10 -0600 |
| Subject | Re: the output in reference of descriptor. |
| Message-ID | <mailman.13324.1408767061.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Aug 21, 2014 at 7:25 PM, luofeiyu <elearn2014@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.
Back to top | Article view | comp.lang.python
csiph-web