Status of PEP's?

Tim Peters tim.one at comcast.net
Thu Feb 28 20:36:48 EST 2002


[Gareth McCaughan]
> ...
> (My own preferences, not that anyone asked for them:
> I always rather liked the range literal proposal, but
> GvR rejected that.

I did too -- until I applied the patch and used it for a couple hours.
That's part of how it ended up getting rejected; another part was that the
patch author confessed he didn't really care for it either.  One annoyance
was that

    for i in [0:len(a)]:

was actually more clumsy to type than

    for i in range(len(a)):

and even after two intense hours I just couldn't stop from writing it

    for i in [len(a)]:

instead -- which also has a meaning, but not one I had in mind.  Negative
bang for the buck isn't Pythonic, at least not when we can help it.

> I also like the "for 3 <= i < 10" one, which I think is *beautiful*
> but maybe slightly too cute.)

I'd rather iterate over i than over 3 <wink>.





More information about the Python-list mailing list