Argument count mismatch
dan.kluev at gmail.com
Fri Apr 22 12:19:19 CEST 2011
On Fri, Apr 22, 2011 at 12:43 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> It looks to me like this function relies on no fewer than three global
> variables, two that you read from and one which you write to:
> This is almost certainly poor design. Using global state is almost always
> harmful and should be avoided.
Looks like its something similar to Pylons web framework. While
generally globals vars are indeed bad, in this case they are
specifically provided by framework to be used this way.
They are 'thread-local' rather than global, and usually cause no harm,
since framework guarantees that these instances are bound to context
of this particular http request.
With best regards,
More information about the Python-list