Re: Postfix conditionals

2014-02-04 Thread BartC
"GöktuğKayaalp" wrote in message news:mailman.6377.1391490975.18130.python-l...@python.org... "BartC" writes: "Göktuğ Kayaalp" wrote in message news:mailman.4966.1388953508.18130.python-l...@python.org... AFAIK, we do not have "postfix conditionals" in Python, i.e. a condition appended to

Re: Postfix conditionals

2014-02-03 Thread Chris Angelico
On Tue, Feb 4, 2014 at 4:16 PM, Göktuğ Kayaalp wrote: > With my proposal implemented, the language would > would be encouraging having multiple statements in one line, that looks > like a single statement, but is indeed a composition of two. I wouldn't have a problem with if not i: break in Pyt

Re: Postfix conditionals

2014-02-03 Thread Göktuğ Kayaalp
[comments inline] "BartC" writes: > "Göktuğ Kayaalp" wrote in message > news:mailman.4966.1388953508.18130.python-l...@python.org... > >> AFAIK, we do not have "postfix conditionals" in Python, i.e. a condition >> appended to a >> statement, which determines whether the statement runs or not: >

Re: Postfix conditionals

2014-02-03 Thread BartC
"Göktuğ Kayaalp" wrote in message news:mailman.4966.1388953508.18130.python-l...@python.org... AFAIK, we do not have "postfix conditionals" in Python, i.e. a condition appended to a statement, which determines whether the statement runs or not: py> for i in [False]: ... break if not i

Re: Postfix conditionals

2014-01-06 Thread Rhodri James
On Mon, 06 Jan 2014 07:51:28 -, Göktuğ Kayaalp wrote: Thanks for the input! I'd be quite interested in examples which required you to "mentally transpose the conditional back to the start of the statement", by the way. Sorry, it's been too long and I don't have any relevant Perl arou

Re: Postfix conditionals

2014-01-05 Thread Göktuğ Kayaalp
On 06-01-2014 03:40, Rhodri James wrote: On Sun, 05 Jan 2014 20:24:53 -, Göktuğ Kayaalp wrote: AFAIK, we do not have "postfix conditionals" in Python, i.e. a condition appended to a statement, which determines whether the statement runs or not: py> for i in [False]: ... bre

Re: Postfix conditionals

2014-01-05 Thread Terry Reedy
On 1/5/2014 3:24 PM, Göktuğ Kayaalp wrote: Hi, AFAIK, we do not have "postfix conditionals" in Python, i.e. a condition appended to a statement, which determines whether the statement runs or not: py> for i in [False]: ... break if not i The above piece of code is equivalent to this

Re: Postfix conditionals

2014-01-05 Thread Rhodri James
On Sun, 05 Jan 2014 20:24:53 -, Göktuğ Kayaalp wrote: AFAIK, we do not have "postfix conditionals" in Python, i.e. a condition appended to a statement, which determines whether the statement runs or not: py> for i in [False]: ... break if not i The above piece of code

Re: Re: Postfix conditionals

2014-01-05 Thread Chris Rebert
on that I have posted > to python-list@python.org, so I am forwarding it to here. > Original Message ---- > Subject: Re: Postfix conditionals > Date: Sun, 5 Jan 2014 14:09:14 -0800 > From: Chris Rebert > To: Göktuğ Kayaalp > CC: Python -- https://mail.pyth

Fwd: Re: Postfix conditionals

2014-01-05 Thread Göktuğ Kayaalp
This was sent to me as a private reply to a question that I have posted to python-list@python.org, so I am forwarding it to here. Chris, please send your messages to the list, and cc the OP. Original Message Subject:Re: Postfix conditionals Date: Sun, 5 Jan 2014 14

Re: Postfix conditionals

2014-01-05 Thread Chris Rebert
On Sun, Jan 5, 2014 at 12:24 PM, Göktuğ Kayaalp wrote: > Hi, > > AFAIK, we do not have "postfix conditionals" in Python, i.e. a condition > appended to a > statement, which determines whether the statement runs or not: > > py> for i in [False]: > ... break if not i > > The above piece of c

Re: Postfix conditionals

2014-01-05 Thread Dan Stromberg
On Sun, Jan 5, 2014 at 12:41 PM, Roy Smith wrote: > In article , > Göktu€ Kayaalp wrote: > >>py> for i in [False]: >>... break if not i > > Python is not Perl. Personally, I find the suggested syntax jarring. I'd prefer that it not go into Python. -- https://mail.python.org/mailma

Re: Postfix conditionals

2014-01-05 Thread Göktuğ Kayaalp
On 05-01-2014 22:41, Roy Smith wrote: In article , Göktu€ Kayaalp wrote: py> for i in [False]: ... break if not i Python is not Perl. Well done! Good for you, that you know the fact; but you are not being constructive. Python is not C either, but we have the while loop.

Re: Postfix conditionals

2014-01-05 Thread Roy Smith
In article , Göktu€ Kayaalp wrote: >py> for i in [False]: >... break if not i Python is not Perl. -- https://mail.python.org/mailman/listinfo/python-list