Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3857
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!feeder.news-service.com!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <dan.kluev@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.028 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'context': 0.04; 'framework.': 0.07; 'fewer': 0.09; 'globals': 0.09; 'pylons': 0.09; 'relies': 0.09; 'variables,': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'global,': 0.16; 'framework': 0.16; 'header:In-Reply-To:1': 0.22; 'specifically': 0.27; 'function': 0.27; 'message- id:@mail.gmail.com': 0.28; 'looks': 0.28; 'daniel': 0.29; 'fri,': 0.29; 'bound': 0.29; 'certainly': 0.29; 'guarantees': 0.31; "skip:' 10": 0.32; 'to:addr:python-list': 0.32; 'generally': 0.33; 'using': 0.34; 'instances': 0.35; 'usually': 0.36; 'rather': 0.36; 'session': 0.36; 'two': 0.37; 'way.': 0.37; 'case': 0.37; 'should': 0.37; 'received:209.85': 0.37; 'apr': 0.38; 'http': 0.38; 'steven': 0.38; 'received:google.com': 0.38; 'used': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'similar': 0.40; 'header:Received:5': 0.40; 'best': 0.60; '2011': 0.62; 'cause': 0.65; '12:43': 0.84; 'received:209.85.210.174': 0.84; 'received :mail-iy0-f174.google.com': 0.84; 'avoided.': 0.91; 'harmful': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=d4pdUTgeCoEw4ki1t8cbTYubvXZJYGlF19T94zXrWCg=; b=Z+bSSLd8aXzwqTot9cZZ5LkqMIMOdnqdbPnjJUMoNx4nSm63W7Wd0UFUFVqzbesMHC apDxqx8MMnJ4R9iPHapHOU1MKvtITz1WU2xz+Nkib0r3wodUfvQSEWjKxB1rjwQO56jJ tociNL0P3H//ZASB31Ee3kxF9sbQetH4WFbUQ= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ZGnwzA1qH8Ya+hw/9F8FNyFMJwmlHxaIhKwZ3anYiDj+WJ6JfI6oCC+LLjTpMLZvVa Sn9T3P3Fm0Z6o5fQ49/2tqcT5j2vpYWwolbPtfHjFgOcXJCMcoRK+5Txw94kGmqR0phW 9ZK9otOWh6x9R0sSvcMzxYqdLCvHxm1uJothM= |
| MIME-Version | 1.0 |
| In-Reply-To | <4db0dd4b$0$29978$c3e8da3$5496439d@news.astraweb.com> |
| References | <ac20c08e-6957-4836-9319-e668a8da8112@q30g2000vbs.googlegroups.com> <4db0dd4b$0$29978$c3e8da3$5496439d@news.astraweb.com> |
| Date | Fri, 22 Apr 2011 21:19:19 +1100 |
| Subject | Re: Argument count mismatch |
| From | Daniel Kluev <dan.kluev@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.740.1303467562.9059.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1303467562 news.xs4all.nl 81484 [::ffff:82.94.164.166]:39937 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:3857 |
Show key headers only | View raw
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