Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.064 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'output': 0.05; '21,': 0.07; 'wrote:': 0.18; 'thu,': 0.19; '>>>': 0.22; 'aug': 0.22; 'email addr:gmail.com>': 0.22; '>>>': 0.24; 'instance,': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'work.': 0.31; 'class': 0.32; 'skip:_ 10': 0.34; 'subject:the': 0.34; 'received:google.com': 0.35; 'i.e.': 0.36; 'method': 0.36; 'skip:& 10': 0.38; 'work?': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'above,': 0.60; 'tell': 0.60; "you're": 0.61; '7:25': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=RSa6ytMcam6OV8N5eRr16N+JHi9u9dlxanMywd3L1Ts=; b=J1+1avgFTn4X7XMcRn13PHgdJdJVSoGxxoo+h4wfg3+tcUhbGVw+wvy4uugn1HVG0t IYR9TWUkptxDcgE/NgqKikULkA1TiBKXuYmIPhGrKsFsbUBhiFihBU0rAcNKnvCKpLEs N2zd4ArRHaZArX7/Jz6V/mSTnjhimRe0yp/9pQ/KuAyLmuhHxFtNMSJ/+e9ATcncou9M ee/inruEFZ9KXWQuJYmItTjN2c/hpnCn6nOhHUwQo63z7VIhBmvo/BRTF9p0nZFbBZxc B2Bnh+Hc7V/dYq5z2PS9GmI2sawAET2A5EBATE44tGG1ChXnHYkejLE+Ff0DNJw7YRYa pGzA== X-Received: by 10.68.209.194 with SMTP id mo2mr11168178pbc.80.1408767053236; Fri, 22 Aug 2014 21:10:53 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <53F69BEE.5000000@gmail.com> References: <53F69BEE.5000000@gmail.com> From: Ian Kelly Date: Fri, 22 Aug 2014 22:10:13 -0600 Subject: Re: the output in reference of descriptor. To: Python Content-Type: multipart/alternative; boundary=047d7b111b45c790ee05014423ab X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1408767061 news.xs4all.nl 2829 [2001:888:2000:d::a6]:40207 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:76839 --047d7b111b45c790ee05014423ab Content-Type: text/plain; charset=UTF-8 On Thu, Aug 21, 2014 at 7:25 PM, luofeiyu wrote: > >>> c2.d.a > __get__() is called <__main__.C2 object at 0x000000000297BE10> C2'> > __getattribute__() is called > 'abc' > > Why the result of c2.d.a is not : > > __get__() is called <__main__.C2 object at 0x000000000297BE10> 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. --047d7b111b45c790ee05014423ab Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Thu, Aug 21, 2014 at 7:25 PM, luofeiyu <elearn2014@gmail.com> wrote:
> >= ;>> c2.d.a
> __get__() is called <__main__.C2 object at 0x00= 0000000297BE10> <class '__main__.
> C2'>
> __getattribute__() is called
> 'abc'=
>
> Why the result of c2.d.a =C2=A0is not :
>
> __= get__() is called <__main__.C2 object at 0x000000000297BE10> <clas= s '__main__.
> C2'>
> __getattribute__() is called
> 'abc'=

As far as I can tell you pasted the same output twice, so I do= n't understand what it is that you're asking.

> Why the` return self` in the __get__ method in class C =C2=A0does= not work?

It does work. When you type "c2.d" a= bove, the result was the C instance, i.e. self.
--047d7b111b45c790ee05014423ab--