Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'pointer': 0.05; 'subject:Python': 0.06; 'python': 0.08; 'constructs.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:209.85.210.174': 0.19; 'received:mail- iy0-f174.google.com': 0.19; "doesn't": 0.22; 'header:In-Reply- To:1': 0.22; 'message-id:@mail.gmail.com': 0.28; 'bare': 0.30; 'subject:?': 0.31; 'to:addr:python-list': 0.34; 'there': 0.34; 'however,': 0.34; 'agree': 0.35; 'unless': 0.37; 'but': 0.37; 'several': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'where': 0.40; 'direct': 0.66; 'management:': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=JTk32b2kQi8DakIGrWxBdhIx2VhY5U79U6ilPzw3cv8=; b=vuTKoIccyx1QCT0PF46OBdiIL2HgQf7rWsI30JBNCky4vODc2Xl6Zh7uIaENioChac DJcakE6sak40NifDkM6vYlWMWipXlQhIowVFabbU9YbYCcAsVftPwPTcuA1eL1HfsgjN gijgw1nNS165Sl82aIwBUCQ+Pnhp0xTKGc2DM= MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 15 Jul 2011 18:06:30 +1000 Subject: Re: Python ++ Operator? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1310717193 news.xs4all.nl 23977 [2001:888:2000:d::a6]:47218 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9525 2011/7/15 Bj=F6rn 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++]=3Dvalue; or the more direct pointer management: *ptr++=3Dvalue; However, Python doesn't work as close to the bare metal, so it doesn't have such constructs. ChrisA