[Python-Dev] New Super PEP

Collin Winter collinw at gmail.com
Sun Apr 29 20:49:33 CEST 2007


On 4/29/07, Calvin Spealman <ironfroggy at gmail.com> wrote:
> The PEP defines the proposal to enhance the super builtin to work implicitly
> upon the class within which it is used and upon the instance the current
> function was called on. The premise of the new super usage suggested is as
> follows:
>
>     super.foo(1, 2)
>
> to replace the old:
>
>     super(Foo, self).foo(1, 2)

Now that I think about it, your proposal seems to address only one of
super()'s three forms
(http://docs.python.org/lib/built-in-funcs.html#l2h-72):

1. super(type)
2. super(type, instance)
3. super(type, type)

If your intention is to remove the first and third forms from the
language, please justify their removal in your PEP, including your
proposed work-around for their use-cases.

Collin Winter


More information about the Python-Dev mailing list