[mod_python] Question about publisher

Mathieu Cuny cuny at iie.cnam.fr
Fri Aug 10 01:44:54 EST 2001

Hello !

I made a small change in mod_python.publisher.handler, because i needed
a function with a variable number of arguments for using is with
different forms. I just added
if expected:
on line 124, which gives.

# remove unexpected args if some are expected. Do nothing if none were
# given.
# (that means the user wants to use a '**args' arg).
if expected:
        for name in args.keys():
                if name not in expected:
                        del args[name]

It enables functions like : f(**args) to be used with publisher.
I don't know if it is a good idea, but i really needed it...

Was there another way ?

More information about the Mod_python mailing list