A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-January/051211.html below:

[Python-Dev] Re: Zen of Python

[Python-Dev] Re: Zen of Python [Python-Dev] Re: Zen of PythonSkip Montanaro skip at pobox.com
Thu Jan 20 02:47:02 CET 2005
    Phillip> Actually, this is one of those rare cases where optimization
    Phillip> and clarity go hand in hand.  Human brains just don't handle
    Phillip> nesting that well.  It's easy to visualize two levels of nested
    Phillip> structure, but three is a stretch unless you can abstract at
    Phillip> least one of the layers.

Also, if you think about nesting in a class/instance context, something like

    self.attr.foo.xyz()

says you are noodling around in the implementation details of self.attr (you
know it has a data attribute called "foo").  This provides for some very
tight coupling between the implementation of whatever self.attr is and your
code.  If there is a reason for you to get at whatever xyz() returns, it's
probably best to publish a method as part of the api for self.attr.

Skip
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