[Python-Dev] Bad interaction of index and sequence repeat (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jul 29 04:50:21 CEST 2006


Armin Rigo wrote:

This is because PySequenceRepeat(v, w) works by applying w.index in order to call v->sqrepeat.

Why does it do that? Shouldn't index only be used for numbers which are going to be used as an index?

However, index is defined to clip the result to fit in a Pyssizet.

Why is it defined to do this instead of raising OverflowError?

-- Greg



More information about the Python-Dev mailing list