pre-PEP generic objects
Steven Bethard
steven.bethard at gmail.com
Wed Dec 1 01:41:10 EST 2004
Jp Calderone wrote:
> One thing I notice with both of these versions:
>
> >>> Hash(self=10)
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: __init__() got multiple values for keyword argument 'self'
Good call. I've adjusted my methods to look like:
def __init__(*args, **kwds):
self, args = args[0], args[1:]
...
def update(*args, **kwds):
self, args = args[0], args[1:]
...
I believe this should allow a "self" keyword argument.
Steve
More information about the Python-list
mailing list