[Zope] standard_error_message in Python Product

Thomas Guettler Thomas Guettler <thomas@thomas-guettler.de>
Tue, 26 Nov 2002 21:38:58 +0100


On Tue, Nov 26, 2002 at 06:57:38PM +0100, Dieter Maurer wrote:
> Thomas Guettler writes:
>  > On Mon, Nov 25, 2002 at 07:32:03PM +0100, Dieter Maurer wrote:
>  > > Thomas Guettler writes:
>  > >  > Is it possible to write a standard_error_message as a method in a
>  > >  > python product?
>  > >  > 
>  > >  > "def standard_error_message(self, **kwargs)"
>  > > Try:
>  > >     def standard_error_message(self, client=None, REQUEST=None, **kwargs):
>  > 
>  > I tried it with several combinations. Since client and REQUEST are
>  > keywordarguments, the two ways should be the same.
> They are not ;-)
> 
>   With the second definition, "standard_error_message" can be called
>   like "standard_error_message(client,REQUEST)";
>   with the first one, you will get a TypeError.


Yes, you are right. It is not the same. But I tried the following,
too:

def standard_error_message(self, *args, **kwargs)

which didn't work. But it is not very important, i was just
curious. Nevertheless thank you for your suggestion.

 thomas


-- 
Thomas Guettler <guettli@thomas-guettler.de>
http://www.thomas-guettler.de