Help? :) "TypeError: foo() got multiple values for keyword argument 'omicron'

Fredrik Lundh fredrik at pythonware.com
Tue May 1 11:20:18 CEST 2001


Stephen Hansen wrote:
>     It may not be the most elegant, but I think it works so far -- I just
> finished writing it and I was in the process of testing it out when the
> popped up, and I'm stumped as to how to get rid of it. My debug 'prints'
> seem to argue the point of there being more then one 'omicron'.

> class Test:
>     def foo(alpha, beta, omicron=None, omega=[1, 2, 3]):

"foo" is a method, so that should be:

    def foo(self, alpha, beta, omicron=None, omega=[1, 2, 3]):

Cheers /F





More information about the Python-list mailing list