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/2016-June/144913.html below:

[Python-Dev] PEP 520: Ordered Class Definition Namespace

[Python-Dev] PEP 520: Ordered Class Definition Namespace [Python-Dev] PEP 520: Ordered Class Definition NamespaceFranklin? Lee leewangzhong+python at gmail.com
Wed Jun 8 03:07:26 EDT 2016
On Jun 7, 2016 8:52 PM, "Eric Snow" <ericsnowcurrently at gmail.com> wrote:
> * the default class *definition* namespace is now ``OrderdDict``
> * the order in which class attributes are defined is preserved in the

By using an OrderedDict, names are ordered by first definition point,
rather than location of the used definition.

For example, the definition order of the following will be "x, y", even
though the definitions actually bound to the name are in order "y, x".
        class C:
            x = 0
            def y(self): return 'y'
            def x(self): return 'x'

Is that okay?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20160608/504c8706/attachment.html>
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