On Wed, Feb 18, 2009 at 11:32:09PM +0100, Sebastian Rittau wrote:

> I am curious why the following will not work in Python:
> 
>   class foo(object):
>       def bar(self):
>           print self.attr
>           
>   class duck(object):
>       attr = 3.14
>   
>   foo.bar(duck())

Thanks to everybody who has responded on-list or in private. Actually
Guido blogged about this design decision (among other things) in his
latest post to the "The History of Python" blog:
<http://tinyurl.com/c6qya5>.

 - Sebastian
_______________________________________________
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