Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32244
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <sed@thechases.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'none:': 0.05; 'undefined': 0.07; 'block.': 0.09; 'implied,': 0.09; 'subject:while': 0.09; 'cc:addr:python-list': 0.10; 'cases': 0.15; '"while"': 0.16; '-tkc': 0.16; 'expression.': 0.16; 'from:name:tim chase': 0.16; 'intended.': 0.16; 'introduces': 0.16; 'pulls': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'shooting': 0.16; 'simpson': 0.16; 'subject:expression': 0.16; 'twisted': 0.16; 'wrote:': 0.17; 'library,': 0.17; 'accepting': 0.18; '(or': 0.18; 'variable': 0.20; 'regardless': 0.21; 'are.': 0.22; 'diverse': 0.22; 'defined': 0.22; "i'd": 0.22; 'cc:2**0': 0.23; 'elements': 0.23; 'this:': 0.23; 'cc:no real name:2**0': 0.24; 'paul': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:( 20': 0.28; "i'm": 0.29; 'ease': 0.30; 'function': 0.30; '(and': 0.32; 'could': 0.32; 'clear': 0.35; 'nature': 0.35; 'really': 0.36; 'does': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'easier': 0.38; 'possible.': 0.38; 'skip:" 10': 0.40; 'think': 0.40; 'address': 0.60; 'skip:u 10': 0.60; 'side': 0.61; 'is.': 0.62; 'lose': 0.71; 'obvious': 0.71; 'as:': 0.75; 'yourself': 0.77; 'hand': 0.82; 'dumb': 0.84; 'received:50.22': 0.84; 'specs.': 0.84; 'effects.': 0.91; 'hate': 0.93 |
| Date | Fri, 26 Oct 2012 18:26:26 -0500 |
| From | Tim Chase <sed@thechases.com> |
| User-Agent | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111120 Icedove/3.1.16 |
| MIME-Version | 1.0 |
| To | Cameron Simpson <cs@zip.com.au> |
| Subject | Re: while expression feature proposal |
| References | <7xlietjjsd.fsf@ruckus.brouhaha.com> <20121026220338.GA25126@cskk.homeip.net> |
| In-Reply-To | <20121026220338.GA25126@cskk.homeip.net> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - boston.accountservergroup.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - thechases.com |
| X-Source | |
| X-Source-Args | |
| X-Source-Dir | |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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.2914.1351293937.27098.python-list@python.org> (permalink) |
| Lines | 49 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1351293937 news.xs4all.nl 6919 [2001:888:2000:d::a6]:39056 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:32244 |
Show key headers only | View raw
On 10/26/12 17:03, Cameron Simpson wrote:
> On 26Oct2012 09:10, Paul Rubin <no.email@nospam.invalid> wrote:
> | while (client.spop("profile_ids") as profile_id) is not None:
>
> Now this pulls me from a -0 to a +0.5.
>
> Any doco would need to make it clear that no order of operation is
> implied, so that this:
>
> x = 1
> y = (2 as x) + x
>
> does not have a defined answer; might be 2, might be 3. Just like any
> other function call with side effects.
I really don't like undefined (or underdefined) specs. If it was to
be PEP'd out, I'd want to address as many edge cases as possible.
Such as
y = (2 as x) + (3 as x) + (4 as x)
y = (2 as x) + 4 as x
y = booleanish and (2 as x) or (4 as x)
y = booleanish and 2 or 4 as x
y = (2 as x) if booleanish else (3 as x)
y = (2 as x) if booleanish else (3 as z)
regardless of how "$PEJORATIVE, that's a dumb thing to do!" it is.
I hate C for how underdefined a lot of corners are. ("amongst my
hatreds of C are such diverse elements as: underdefined corners, a
pitiful standard library, the ease of shooting yourself in the foot,
...")
> I'm not +1 because to my mind it still presents a way for
> assignment/binding to not be glaringly obvious at the left hand side of
> an expression.
I think this is why I like it in the "while" (and could be twisted
into accepting it for "if") because it also introduces an
implied/actual scope for which the variable is intended. In an
arbitrary evaluation/assignment, it's much easier to lose the
"definition" nature of it at the top of a block.
-tkc
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: while expression feature proposal Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-24 16:54 -0600
Re: while expression feature proposal Paul Rubin <no.email@nospam.invalid> - 2012-10-24 16:08 -0700
Re: while expression feature proposal Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-24 17:39 -0600
Re: while expression feature proposal Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-10-25 09:21 +0200
Re: while expression feature proposal Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-10-25 12:12 +0200
Re: while expression feature proposal Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-25 10:36 -0600
Re: while expression feature proposal Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-10-25 22:49 +0200
Re: while expression feature proposal Dan Loewenherz <dloewenherz@gmail.com> - 2012-10-25 22:12 -0700
Re: while expression feature proposal Paul Rubin <no.email@nospam.invalid> - 2012-10-25 23:06 -0700
Re: while expression feature proposal Chris Angelico <rosuav@gmail.com> - 2012-10-26 17:23 +1100
Re: while expression feature proposal Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-26 09:43 +0000
Re: while expression feature proposal Dan Loewenherz <dloewenherz@gmail.com> - 2012-10-26 08:29 -0700
Re: while expression feature proposal Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-26 09:42 -0600
Re: while expression feature proposal Paul Rubin <no.email@nospam.invalid> - 2012-10-26 09:10 -0700
Re: while expression feature proposal Cameron Simpson <cs@zip.com.au> - 2012-10-27 09:03 +1100
Re: while expression feature proposal Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-26 16:48 -0600
Re: while expression feature proposal Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-27 00:07 +0000
Re: while expression feature proposal Paul Rubin <no.email@nospam.invalid> - 2012-10-26 20:43 -0700
Re: while expression feature proposal Tim Chase <sed@thechases.com> - 2012-10-26 18:26 -0500
Re: while expression feature proposal Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-26 19:41 -0400
Re: while expression feature proposal Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-26 19:19 -0400
Re: while expression feature proposal Chris Angelico <rosuav@gmail.com> - 2012-10-27 11:42 +1100
Re: while expression feature proposal Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-26 19:12 -0400
Re: while expression feature proposal Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-27 00:18 +0000
Re: while expression feature proposal Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-26 20:27 -0400
Re: while expression feature proposal Tim Chase <python.list@tim.thechases.com> - 2012-10-27 14:15 -0500
Re: while expression feature proposal Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-26 19:51 -0400
Re: while expression feature proposal Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-25 10:47 -0600
Re: while expression feature proposal Paul Rudin <paul.nospam@rudin.co.uk> - 2012-10-25 10:35 +0100
csiph-web