Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3857
| References | <ac20c08e-6957-4836-9319-e668a8da8112@q30g2000vbs.googlegroups.com> <4db0dd4b$0$29978$c3e8da3$5496439d@news.astraweb.com> |
|---|---|
| Date | 2011-04-22 21:19 +1100 |
| Subject | Re: Argument count mismatch |
| From | Daniel Kluev <dan.kluev@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.740.1303467562.9059.python-list@python.org> (permalink) |
On Fri, Apr 22, 2011 at 12:43 PM, Steven D'Aprano <steve+comp.lang.python@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
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar
Argument count mismatch RVince <rvince99@gmail.com> - 2011-04-21 12:33 -0700
Re: Argument count mismatch Wolfgang Rohdewald <wolfgang@rohdewald.de> - 2011-04-21 21:43 +0200
Re: Argument count mismatch Chris Angelico <rosuav@gmail.com> - 2011-04-22 06:15 +1000
Re: Argument count mismatch John Gordon <gordon@panix.com> - 2011-04-21 20:33 +0000
Re: Argument count mismatch Westley MartÃnez <anikom15@gmail.com> - 2011-04-21 15:41 -0700
Re: Argument count mismatch Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-22 01:43 +0000
Re: Argument count mismatch Daniel Kluev <dan.kluev@gmail.com> - 2011-04-22 21:19 +1100
csiph-web