Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69257 > unrolled thread

Re: Python language hack for C-style programmers [DO NOT USE!] :-)

Started byChris Angelico <rosuav@gmail.com>
First post2014-03-28 19:38 +1100
Last post2014-03-28 19:38 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python language hack for C-style programmers [DO NOT USE!] :-) Chris Angelico <rosuav@gmail.com> - 2014-03-28 19:38 +1100

#69257 — Re: Python language hack for C-style programmers [DO NOT USE!] :-)

FromChris Angelico <rosuav@gmail.com>
Date2014-03-28 19:38 +1100
SubjectRe: Python language hack for C-style programmers [DO NOT USE!] :-)
Message-ID<mailman.8661.1395995940.18130.python-list@python.org>
On Fri, Mar 28, 2014 at 7:26 PM, Peter Otten <__peter__@web.de> wrote:
> One of the most elegant applications of these two principles is to
> declare a variable in a condition. Consider:
>
> if (double d = prim(true)) {
>     left /= d;
>     break;
> }

Okay! Then I withdraw the "or, to my knowledge, C++" part of my
original statement. It's a useful feature, if not a unique one.

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web