supermethod shortcut
huy
nytimes at swiftdsl.com.au
Fri May 28 00:49:10 EDT 2004
Sean Ross wrote:
> "David Fraser" <davidf at sjsoft.com> wrote in message
> news:c91uk9$krq$1 at ctb-nnrp2.saix.net...
>
>>Hi
>>
>>I was recently thinking about the awkwardness I find in using the super
>>method to call a superclass's function.
>>
>
> [snip]
>
>>The whole super(Y, self).some_method seems an awkward way to say "call
>>the superclass's version of this function".
>
> [snip]
>
>
> You may find the following recipe interesting:
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/284528
>
This recipe is nice. It would be nicer if it became the standard when
doing OOP in python. I always disliked the current super call in python;
too much implementation detail in the syntax IMO.
Huy
More information about the Python-list
mailing list