[Python-3000] Removing __var

Fred L. Drake, Jr. fdrake at acm.org
Mon Oct 2 02:22:50 CEST 2006


On Sunday 01 October 2006 17:20, Giovanni Bajo wrote:
 > Would you want this PEP to address the fact that, in most cases, you just
 > want to forward all the arguments to super call (aka super.foo(*args,
 > **args)), ala Dylan's nextmethod? Or is this what you meant with KISS? :)

It's not at all clear to me that passing along *args, **kwargs is the most 
common thing.  While I've done that at times, it's been the exception rather 
than the rule.

I expect the most valuable aspect of some new syntax is to replace the 
super(MyClass, self) with something shorter; possibly super(MyClass, 
self).thismethod.  Something like this seems sufficient:

--------------------------------------
class Derived(Base):

    def method(self, *args, **kw):
        supercall(*args, **kw)
        self.did_this = True
--------------------------------------


  -Fred

-- 
Fred L. Drake, Jr.   <fdrake at acm.org>


More information about the Python-3000 mailing list