Re:Wield Python's super() like a Jedi
by Peristarkawan on Thursday May 26, 2011 @04:49PM
(#2589389)
That's true. The second one might be better written as:
Or, in Python 3:
(making shapename a required keyword-only argument)
[ Parent
| on HN ]
def __init__(self, shapename, **kwds):
is not better written; it allows shapename to be passed positionally which makes cooperative inheritance fragile.
Re:Wield Python's super() like a Jedi
by Peristarkawan on Thursday May 26, 2011 @06:46PM
(#2589704)
The version that I was rewriting:
def __init__(self, shapename=None, **kwds):
also allows that.