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


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

Re: Python ++ Operator?

Started byBjörn Lindqvist <bjourne@gmail.com>
First post2011-07-15 09:46 +0200
Last post2011-07-15 09:46 +0200
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 ++ Operator? Björn Lindqvist <bjourne@gmail.com> - 2011-07-15 09:46 +0200

#9519 — Re: Python ++ Operator?

FromBjörn Lindqvist <bjourne@gmail.com>
Date2011-07-15 09:46 +0200
SubjectRe: Python ++ Operator?
Message-ID<mailman.1054.1310716016.1164.python-list@python.org>
2011/7/15 Rafael Durán Castañeda <rafadurancastaneda@gmail.com>:
> What's the meaning of using i++? Even, does exist ++ operator in python?

No it doesn't, which is a good thing. Python differentiates between
expressions and variable assignments. "i++" in C both assigns the
value i + 1 to i AND evaluates to i. Pre and post-increments are
almost always confusing unless they are used as the counter-variable
inside for-loops.


-- 
mvh/best regards Björn Lindqvist
http://www.footballexperts.net/

[toc] | [standalone]


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


csiph-web