A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-February/086541.html below:

[Python-Dev] Duck-typing self

[Python-Dev] Duck-typing self [Python-Dev] Duck-typing selfSebastian Rittau srittau at jroger.in-berlin.de
Sat Feb 28 00:57:20 CET 2009
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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4