Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: [Python-Dev] Dinamically set __call__ method Date: Mon, 10 Nov 2014 00:38:07 +1300 Lines: 11 Message-ID: References: <545919B6.7040007@stoneleaf.us> <87a943qyvn.fsf@handshake.de> <545CC204.2010301@stoneleaf.us> <8761eq424e.fsf@handshake.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net NUmuHcVVJiK6xNFavIL3WAscP4qYuC4GUCOdSf0XfNL137/ynY Cancel-Lock: sha1:MHht//bwkD2+GkzUmgt23YyUVfM= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:80424 Ethan Furman wrote: > And the thing going on is the normal python behavior (in > __getattribute__, I believe) of examining the returned attribute to see > if it is a descriptor, and if so invoking it. Only if you look it up through the instance, though. Normally, if you look up an attribute on a class, the descriptor protocol doesn't get triggered. -- Greg