Flavio wrote:
> Ok, its not thousands, but more like dozens of variables...
> I am reading a large form from the web which returns a lot of values.
> (I am Using cherrypy)
>
> I know I could pass these variables around as:
>
> def some_function(**variables):
> ...
>
> some_function(**variables)
>
> but its a pain in the neck to have to refer to them as
> variables['whatever']...
>
> dont you think?
Use a Bunch.
class Bunch(dict):
def __init__(self, *args, **kwds):
dict.__init__(self, *args, **kwds)
self.__dict__ = self
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
--
http://mail.python.org/mailman/listinfo/python-list