PEP 284, Integer for-loops

Delaney, Timothy tdelaney at avaya.com
Wed Mar 6 18:09:33 EST 2002


>     PEP 276 [4] proposes to allow automatic conversion of integers to
>     iterators, simplifying the most common half-open case but not
>     addressing the complexities of other types of interval.
>     Additional alternatives have been discussed on python-list.

This is incorrect. PEP 276 proposes to make integers iterable. There is a
significant difference, which I have noticed you either not understanding or
ignoring.

I would suggest an amendment to PEP 284 to correct this.

Whilst I like the general idea of PEP 284, I see too many problems with it -
most notable, that it is an attempt to be a general solution (whether the
problem exists or not - I believe it does) without being a general solution
(no step ... though it can be simulated to an extent, different syntax to
traverse in the opposite direction, etc).

Cheers.

Tim Delaney




More information about the Python-list mailing list