Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100133
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Tim Chase <python.list@tim.thechases.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Understanding Python from a PHP coder's perspective |
| Date | Mon, 7 Dec 2015 21:11:14 -0600 |
| Lines | 25 |
| Message-ID | <mailman.48.1449545480.12405.python-list@python.org> (permalink) |
| References | <f39f97f5-d7a1-4d7c-a7ac-527c2ffff76b@googlegroups.com> <44d92f52-4f92-470d-a724-102a14d185de@googlegroups.com> <mailman.35.1449525620.12405.python-list@python.org> <3e30fc58-4460-40a6-a639-22cd4d406f0b@googlegroups.com> <CAPTjJmoG2BSc_vWpKaKjBPfGCHXRgboYPdq-BnA5rCkmrZa0YA@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de F5dEV80s5oNHlVPbe5938wwgTsO+UqyT/zFYROLv4Jhg== |
| Return-Path | <python.list@tim.thechases.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.014 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.05; 'variable,': 0.07; 'cookies,': 0.09; 'python': 0.10; 'instead.': 0.15; '-tkc': 0.16; 'bugs,': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'key/value': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'sits': 0.16; 'subject:perspective': 0.16; 'wrote:': 0.16; '(you': 0.23; 'header:In-Reply-To:1': 0.24; 'chris': 0.26; 'idea': 0.28; '(it': 0.29; 'etc).': 0.29; 'request,': 0.29; 'program,': 0.29; 'etc.)': 0.32; 'info': 0.34; 'next': 0.35; 'there': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'charset:us-ascii': 0.37; 'goes': 0.39; 'subject:from': 0.39; 'to:addr:python.org': 0.40; 'waiting': 0.60; 'real': 0.62; 'back': 0.62; 'request.': 0.66; 'received:50': 0.66; 'state,': 0.66; 'state.': 0.72; 'different.': 0.91; 'sitting': 0.93 |
| X-Sender-Id | wwwh|x-authuser|tim@thechases.com |
| X-Sender-Id | wwwh|x-authuser|tim@thechases.com |
| X-MC-Relay | Neutral |
| X-MailChannels-SenderId | wwwh|x-authuser|tim@thechases.com |
| X-MailChannels-Auth-Id | wwwh |
| X-MC-Loop-Signature | 1449544382273:813746098 |
| X-MC-Ingress-Time | 1449544382273 |
| In-Reply-To | <CAPTjJmoG2BSc_vWpKaKjBPfGCHXRgboYPdq-BnA5rCkmrZa0YA@mail.gmail.com> |
| X-Mailer | Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) |
| X-AuthUser | tim@thechases.com |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:100133 |
Show key headers only | View raw
On 2015-12-08 10:09, Chris Angelico wrote: > All three are very different. > > 1) Process state. > > You start up a Python program, and it sits there waiting for a > request. You give it a request, and get back a response; it goes > back to waiting for a request. If you change a global variable, or > maintain persistent state, or anything, the next request will 'see' > that change. This is completely global. 1) This is completely global *to the process* (you can have multiple Python processes sitting around waiting, taking advantage of multiple cores) 2) This is almost always a bad idea for multiple reasons (it can get in the way of scaling, it can produce hard-to-track-down bugs, etc). Use a real session store (a database, a key/value store like memcached, a NoSQL store like Redis, store session info in cookies, etc.) instead. -tkc
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Understanding Python from a PHP coder's perspective villascape@gmail.com - 2015-12-07 13:07 -0800
Re: Understanding Python from a PHP coder's perspective villascape@gmail.com - 2015-12-07 13:21 -0800
Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 09:00 +1100
Re: Understanding Python from a PHP coder's perspective villascape@gmail.com - 2015-12-07 14:27 -0800
Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 10:09 +1100
Re: Understanding Python from a PHP coder's perspective villascape@gmail.com - 2015-12-07 17:00 -0800
Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 14:26 +1100
Re: Understanding Python from a PHP coder's perspective Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-07 16:10 -0700
Re: Understanding Python from a PHP coder's perspective Cameron Simpson <cs@zip.com.au> - 2015-12-08 10:07 +1100
Re: Understanding Python from a PHP coder's perspective Tim Chase <python.list@tim.thechases.com> - 2015-12-07 21:11 -0600
Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 14:47 +1100
Re: Understanding Python from a PHP coder's perspective Cameron Simpson <cs@zip.com.au> - 2015-12-08 08:33 +1100
Re: Understanding Python from a PHP coder's perspective Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-07 14:37 -0700
Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 08:40 +1100
Re: Understanding Python from a PHP coder's perspective Terry Reedy <tjreedy@udel.edu> - 2015-12-07 16:53 -0500
Re: Understanding Python from a PHP coder's perspective Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-07 14:59 -0700
Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 09:03 +1100
Re: Understanding Python from a PHP coder's perspective Tim Chase <python.list@tim.thechases.com> - 2015-12-07 16:28 -0600
Re: Understanding Python from a PHP coder's perspective villascape@gmail.com - 2015-12-07 20:11 -0800
Re: Understanding Python from a PHP coder's perspective Peter Otten <__peter__@web.de> - 2015-12-08 10:24 +0100
Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 20:40 +1100
csiph-web