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


Groups > comp.lang.python > #9570

Re: Python ++ Operator?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'pointer': 0.05; 'sure.': 0.05; 'subject:Python': 0.06; 'does.': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'direct,': 0.16; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'figure': 0.21; 'header:In-Reply- To:1': 0.22; 'received:84': 0.28; 'stefan': 0.29; 'pattern': 0.30; 'subject:?': 0.31; 'chris': 0.32; 'to:addr:python-list': 0.34; 'header:X-Complaints-To:1': 0.34; 'header:User-Agent:1': 0.34; 'there': 0.34; 'agree': 0.35; 'unless': 0.37; 'but': 0.37; 'several': 0.37; 'received:org': 0.38; 'subject:: ': 0.38; 'think': 0.38; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'where': 0.40; 'your': 0.60; 'direct': 0.66; 'eyes': 0.66; 'management:': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Stefan Behnel <stefan_ml@behnel.de>
Subject Re: Python ++ Operator?
Date Fri, 15 Jul 2011 23:09:02 +0200
References <CAH+GN=3PDVnzEp7PJZk7y9BH=vbbsPs7UJoyRcJO3o2wCg-iag@mail.gmail.com> <CALG+76dizm12CbpOAzoC7U8x6N0OH3gfBR1OjgeLtDcgJ9y50w@mail.gmail.com> <CAPTjJmpAZsgqHvFvC5tvmLVw0OrNjrAr8v+hyCKeDVqyA-srpA@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host dslb-084-056-063-040.pools.arcor-ip.net
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10
In-Reply-To <CAPTjJmpAZsgqHvFvC5tvmLVw0OrNjrAr8v+hyCKeDVqyA-srpA@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1077.1310764158.1164.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1310764158 news.xs4all.nl 23836 [2001:888:2000:d::a6]:43224
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:9570

Show key headers only | View raw


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 | NextNext in thread | Find similar | Unroll thread


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