[Python-3000] super(): issues [Was: Removing 'self' from method definitions]

Jim Jewett jimjjewett at gmail.com
Thu Apr 20 16:41:04 CEST 2006


On 4/20/06, Giovanni Bajo <rasky at develer.com> wrote:

> Right. Part of the problems would be solved if we forced
> keyword arguments only in super calls (as everything else
> is really a latent bug),

As mentioned elsewhere, for a well-known API like __getattr__, it
really isn't a bug to use positional arguments.

Otherwise, it makes sense to use keywords for any call, even if it has
nothing to do with super.

> and if we had an implicit, default
> way of "doing the right thing" with super (that is,
> forwarding everything).

Right now, this requires a slower path allowing *args and **kwargs,
even if you don't use them.

Right now, this fails if there isn't a super method.  (e.g., if you
inherit directly from object, and the method isn't there, but might
exist on something your object gets composed with.)

-jJ


More information about the Python-3000 mailing list