A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/339954.html below:

An interesting python problem

An interesting python problem An interesting python problembruno modulix onurb at xiludom.gro
Wed Sep 14 05:28:18 EDT 2005
Johnny Lee wrote:
> bruno modulix wrote:
> 
>>I dont see anything interesting nor problematic here. If you understand
>>the difference between class attributes and instance attributes, the
>>difference between mutating an object and rebinding a name, and the
>>attribute lookup rules in Python, you'll find that all this is the
>>normal and expected behavior.
>>
>>Or did I miss something ?
>>
> 
> 
> No, you didn't miss anything as I can see. Thanks for your help:)

You're welcome !-)

Ok, I guess all this is not that intuitive, specially when comes from
less dynamic languages. Python's object model is quite powerful, but one
need to have a good understanding of it to understand *why* it works
that way. There's an interesting slideshow about metaclasses and
descriptors that may help (if your brain is robust enough !-) :

http://www.python.org/pycon/dc2004/papers/24/metaclasses-pycon.pdf

HTH
-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"

More information about the Python-list 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