I'm very tempted to check in my patch even though the PEP isn't updated (it's been renamed from PEP 367 though). Any objections?
It is python.org/sf/1727209, use the latest (topmost) super2.diff patch. This would make the new and improved syntax super().foo(), which gets the class and object from the current frame, as the __class__ cell and the first argument, respectively. Neither __class__ nor super are keywords, but the compiler spots the use of 'super' as a free variable and makes sure the '__class__' is available in any frame where 'super' is used. Code is welcome to also use __class__ directly. It is set to the class before decoration (since this is the only way that I can figure out how to generate the code). The old syntax super(SomeClass, self) still works; also, super(__class__, self) is equivalent (assuming SomeClass is the nearest lexically containing class). -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com