[Python-3000] [Python-Dev] PEP 367: New Super (original) (raw)
Jim Jewett jimjjewett at gmail.com
Sat May 26 17:47:47 CEST 2007
- Previous message: [Python-3000] [Python-Dev] PEP 367: New Super
- Next message: [Python-3000] Wither PEP 335 (Overloadable Boolean Operators)?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 5/25/07, Guido van Rossum <guido at python.org> wrote:
We could make the class in question a fourth attribute of the (poorly named) "bound method" object, e.g. imclassforsuper (imsuper would be confusing IMO).
In the past, you have referred to this as the static class.
I think it has other uses as well, such as a class-wide registry (whose location shouldn't be redirected without overriding the whole method).
I realize this is the rejected this_class proposal, but I can't help feeling that if we're going to create the magic attribute anyhow, it makes sense to have it be generally usable, instead of only as a token to create a super.
In my proposal the 'super' variable contains whatever super(, ) returned, rather than which you seem to be proposing here.
That's fine, but the still has to be stored with the method to generate that super -- so why not expose it too?
-jJ
- Previous message: [Python-3000] [Python-Dev] PEP 367: New Super
- Next message: [Python-3000] Wither PEP 335 (Overloadable Boolean Operators)?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]