PEP 284, Integer for-loops

phil hunt philh at comuno.freeserve.co.uk
Wed Mar 6 19:31:57 EST 2002


On Wed, 6 Mar 2002 11:37:17 -0700, Bjorn Pettersen <BPettersen at NAREX.com> wrote:
>> From: David Eppstein [mailto:eppstein at ics.uci.edu] 
>> Subject: PEP 284, Integer for-loops
>
>Thanks for writing the PEP.
>
>I see this as a general proposal for a range syntax, and I disagree with
>it because:
>
>  - it doesn't handle the general range issues, i.e. step value,
>    and if we had to add yet another syntax to get general ranges
>    it would be too confusing.
>
>  - I would like range objects to be first class, ie. I would want
>    to be able to pass ranges to functions, return them from 
>    functions, and do all the other things one can do with first
>    class objects. This proposal only adds syntactic sugar to the 
>    for loop.

What is wrong with using the existing range() and xrange()?

-- 
<"><"><"> Philip Hunt <philh at comuno.freeserve.co.uk> <"><"><">
"I would guess that he really believes whatever is politically 
advantageous for him to believe." 
                        -- Alison Brooks, referring to Michael
                              Portillo, on soc.history.what-if



More information about the Python-list mailing list