[Zope] too many arguments TypeError problem

Dieter Maurer dieter@handshake.de
Wed, 22 Aug 2001 23:26:41 +0200 (CEST)


Peter Bengtsson writes:
 >         Photo.Photo.tag(self,REQUEST, display,pdcookie,
 > height,width,alt,args)
 > ... TypeError, too many arguments

 >     def __call__(self, REQUEST=None, display=None,
 >                         pdcookie=None, height=None,
 >                         width=None, alt=None, **args):
 >           " bla bla bla "
 >     tag = __call__
The "**args" mean "arbitrary keyword arguments".
You must not pass a positional argument for them (as you do).

Use:

	apply(Photo.Photo.tag,
	      (self,REQUEST,display,pdcookie,height,width,alt,),
	      args)


Dieter