I was trying to inherit xrange to enable the target object behaviors of an integer list (iterable and in operator support). But I got the following error message:
TypeError: Error when calling the metaclass bases
type 'xrange' is not an acceptable base type
What's special of xrange?
Also, probably not related to that question, I noticed xrange has not method __contains__. For in operation, my basic knowledge is, a in A is equivalent to A.contains(a). Am I wrong, or xrange is something different?
I don't know if I should paste these as two separated questions. Appologize ahead.