range() is not the best way to check range?

Antoon Pardon apardon at forel.vub.ac.be
Sun Jul 23 04:17:08 EDT 2006


On 2006-07-21, Paul Boddie <paul at boddie.org.uk> wrote:
> Regardless of whether myslice inherits from object or not, there's no
> persuading the interpreter that it is a genuine slice, and remember
> that we can't subclass slice (for some reason unknown). So, it would
> appear that the interpreter really wants instances from some specific
> set of types (presumably discoverable by looking at list_subscript in
> listobject.c) rather than some objects conforming to some interface or
> protocol, and perhaps it is implemented this way for performance
> reasons.
>
> In any case, in the core of Python some types/classes are more equal
> than others, and for whatever reason the duck typing breaks down - a
> case of "malbik endar" [1] that you just have to be aware of, I
> suppose.

Is there any chance this will iever change?

Is there any chance the start:stop:step notation will ever
be considered an atom?

-- 
Antoon Pardon



More information about the Python-list mailing list