apply problem

Greg Ewing greg at
Tue Jul 3 06:27:07 CEST 2001

Heiko Wundram wrote:
>       apply(getattr(self,name),(attrs))

Try this instead:


Note the presence of the extra comma. Without
it, you're not passing a tuple containing your
dictionary, but just the dictionary itself.

By the way, there's no need to use apply()
at all in this case. You could just write


and get exactly the same effect.

Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:

More information about the Python-list mailing list