Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9570
| From | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| Subject | Re: Python ++ Operator? |
| Date | 2011-07-15 23:09 +0200 |
| References | <CAH+GN=3PDVnzEp7PJZk7y9BH=vbbsPs7UJoyRcJO3o2wCg-iag@mail.gmail.com> <CALG+76dizm12CbpOAzoC7U8x6N0OH3gfBR1OjgeLtDcgJ9y50w@mail.gmail.com> <CAPTjJmpAZsgqHvFvC5tvmLVw0OrNjrAr8v+hyCKeDVqyA-srpA@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1077.1310764158.1164.python-list@python.org> (permalink) |
Chris Angelico, 15.07.2011 10:06: > 2011/7/15 Björn Lindqvist: >> Pre and post-increments are >> almost always confusing unless they are used as the counter-variable >> inside for-loops. > > I agree that they're often confusing (i+++++j) but there are several > places where they're handy. > > array[count++]=value; > > or the more direct pointer management: > > *ptr++=value; More direct, sure. But readable? Well, only when you know what this specific pattern does. If you have to think about it, it may end up hurting your eyes before you figure it out. Stefan
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Python ++ Operator? Stefan Behnel <stefan_ml@behnel.de> - 2011-07-15 23:09 +0200
Re: Python ++ Operator? "Waldek M." <wm@localhost.localdomain> - 2011-07-16 11:55 +0200
Re: Python ++ Operator? Robert Kern <robert.kern@gmail.com> - 2011-07-16 11:13 -0500
Re: Python ++ Operator? Nobody <nobody@nowhere.com> - 2011-07-16 14:23 +0100
csiph-web