"Mark Tolonen" <[EMAIL PROTECTED]> wrote: ><[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > .. >>In Python ranges are open on the right, so I name cinterval such >>function. > > Yes, and that's fine when dealing with integers and slicing, but when > dealing with characters, it is non-obvious what character to use. > What "looks" correct? > > chars = crange('0','9') + crange('A','Z') + crange('a','z') # > inclusive >
I think bearophile's point was that you had the parameters correct, (specifying 'a' and 'z' makes sense), but the function itself had the wrong name. If you call it 'crange' you are implying the wrong behaviour. Call it something like 'cinterval' instead. -- Duncan Booth http://kupuguy.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list