Life's better without braces

Aahz Maruch aahz at
Tue Feb 22 23:51:24 CET 2000

In article <20000222225522.A5923 at stopcontact.palga.uucp>,
Gerrit Holl  <gerrit at> wrote:
><quote name="Aahz Maruch" date="951249670">
>> Hmmm?  What makes you say that range() is possible in pure Python and
>> xrange() is not?  (I think the latter requires a class with __getitem__
>> but is otherwise doable.)
>xrange returns an XRangeType; can I return that from a Python function?

I agree that you probably cannot return an XRangeType, but I think you
can mimic the xrange() behavior with a class.
                      --- Aahz (Copyright 2000 by aahz at

Androgynous poly kinky vanilla queer het    <*>
Hugs and backrubs -- I break Rule 6

Love does not conquer all.  Humans are extremely flexible, usually more
flexible than we're willing to admit.  But some flexibility comes at a
cost, and sometimes that cost is more than we can bear.

More information about the Python-list mailing list