[Python-Dev] PEP 3135 (new super()) class references broken in 3.3 (original) (raw)
Calvin Spealman ironfroggy at gmail.com
Sun May 20 22:49:02 CEST 2012
- Previous message: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3
- Next message: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, May 20, 2012 at 4:28 PM, Benjamin Peterson <benjamin at python.org> wrote:
2012/5/20 Nick Coghlan <ncoghlan at gmail.com>:
PEP 3135 defines the new zero-argument form of super() as implicitly equivalent to super(class, ), and up until 3.2 has behaved accordingly: if you accessed class from inside a method, you would receive a reference to the lexically containing class. I don't understand why PEP 3135 cares how it's implemented. It's silly enough that you can get the class by "using" super (even just referencing the name). Thus that you can get class reeks of more an implementation detail than a feature to me.
It made sense at the time to discuss the issues together. It was often wanted to reference the "current class" and super was simply the most common reason for this and, as was the point of the PEP in the first place, given an even more direct shortcut.
I never would have considered class a simple implementation detail.
-- Regards, Benjamin
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/ironfroggy%40gmail.com
-- Read my blog! I depend on your acceptance of my opinion! I am interesting! http://techblog.ironfroggy.com/ Follow me if you're into that sort of thing: http://www.twitter.com/ironfroggy
- Previous message: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3
- Next message: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]