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/2015-March/138904.html below:

[Python-Dev] super() does not work during class initialization

[Python-Dev] super() does not work during class initialization [Python-Dev] super() does not work during class initializationGreg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 23 23:22:08 CET 2015
Martin Teichmann wrote:
> maybe
> we could just change the compiler to leave the order in which things are defined
> in a class in the class namespace, say as a member __order__? Then we could
> use plain-old dicts for the class namespace, and we would not slow down class
> creation (not that it matters much), as determining the order would happen at
> compile time.

I don't think the compiler can determine the order in
all cases. Consider:

   class Spam:

     if moon_is_full:
       alpha = 1
       beta = 2
     else:
       beta = 2
       alpha = 1

-- 
Greg
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