why no ++?
Tim Rowe
digitig at cix.co.uk
Mon Aug 6 17:08:00 EDT 2001
In article <mailman.997122491.16083.python-list at python.org>,
com-nospam at ccraig.org (Christopher A. Craig) wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Grant Griffin <not.this at seebelow.org> writes:
>
> > I'm not sure if anyone has explained the philosophical basis of "why
> > no ++". It's rooted in Tim Peters' maxim:
> >
> > There should be on--and preferably only one--obvious way to do
> > things.
> >
>
> Hmm. I think I disagree. If we had i++ (only the postfix version),
> then the obvious way to do:
>
> i+=1
> func(i)
>
> would become
>
> func(i++)
In C/C++ that would be equivalent to
> func(i)
> i+=1
of course, so it wouldn't be obvious to all :-)
More information about the Python-list
mailing list