On Fri, Apr 22, 2011 at 12:43 PM, Steven D'Aprano
<steve+comp.lang.pyt...@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:
>
> c
> Session
> MSPResponse
>
> 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,
Daniel Kluev
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to