Hello.

   We are sorry but we cannot help you. This mailing list is to work on
developing Python (adding new features to Python itself and fixing bugs);
if you're having problems learning, understanding or using Python, please
find another forum. Probably python-list/comp.lang.python mailing list/news
group is the best place; there are Python developers who participate in it;
you may get a faster, and probably more complete, answer there. See
http://www.python.org/community/ for other lists/news groups/fora. Thank
you for understanding.

On Tue, Jan 10, 2012 at 01:32:13AM +1100, Jon Wells wrote:
> I can't find an answer to this grovelling through get user info. on
> descriptors.

   Read carefully http://users.rcn.com/python/download/Descriptor.htm

> Assuming desc() is a data descriptor class why are the following not the
> same???
> 
>     class poop(object):
>         var = desc()
> 
> and
>         
>     class poop(object):
>         def __init__(self):
>             self.var = desc()
> 
> In the second form the descriptor protocol for access to 'var' is
> ignored. 

   From http://users.rcn.com/python/download/Descriptor.htm:

...transforms b.x into type(b).__dict__['x'].__get__(b, type(b))..

   Please note the first type(b).

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            p...@phdru.name
           Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to