[mod_python] getvalue() in util.py

harm harm at millionmonkeys.nl
Tue Dec 18 22:57:49 EST 2001


Moi,

is there any reason there is no getvalue() in mod_python/util.py?
Could be as simple as this:

harm at turing:/tmp$ diff util.py.orig util.py
252a253,259
>     def getvalue(self, key, default=None):
>         """Dictionary style get() method, including 'value' lookup."""
>         if self.has_key(key):
>             return self[key]
>         else:
>             return default
> 

cgi.py has it as well, makes life easier if they one can use the same
funtions under mod_python and plain cgi...


Thanks,

Harmen


-- 
                               The Moon is Waxing Crescent (16% of Full)



More information about the Mod_python mailing list