[Zope] Parameter puzzle

Mark Andrew mark.andrew@fr.bosch.de
Wed, 22 Mar 2000 08:46:19 +0100


Hi Zopistas

while trying to make gtk's (very useful) Boring Product (slightly
more) interesting, I came across the following (for me) strange
behaviour.

manage_ methods seem to always have "REQUEST=None" as their last
parameter. If I remove the "=None" from manage_edit then I notice no
difference, so the actual parameter is presumably being passed.
However if remove the complete formal parameter (and the reference to
REQUEST in the body of the method) 

def manage_edit(self, title): 
        """does this really need a doc string?"""
        self.title = title
#	if REQUEST is not None:
#	    return MessageDialog(
#		title = 'Edited',
#		message = "Properties for %s changed." % self.id,
#		action = './manage_main',
#		)


then everything still works ! Why is python not complaining about a
parameter mismatch ?

I promise to publish a Howto on making Boring more Interesting when
this madness is  over.

Thanks in advance

Mark    

-- 
BOSCH Telecom - UC-PN/ECC1  - Kleyerstr. 94  -  D-60326 Frankfurt a M 
fon:+49 69 7505-6346 		       mailto:mark.andrew@fr.bosch.de 
fax:+49 69 7505-6168	     http://SoftTech.fr.bosch.de (Bosch Only)