Op 2005-12-21, Michael Hoffman schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> Traceback (most recent call last): >> File "<stdin>", line 1, in ? >> File "vslice.py", line 48, in ? >> class iterslice(slice): >> TypeError: Error when calling the metaclass bases >> type 'slice' is not an acceptable base type > > Searching for "not an acceptable base type" in the Python source reveals > that this exception is produced when the proposed base type doesn't have > Py_TPFLAGS_BASETYPE set. > >> So what is going on. I thought the class vs type >> distinction was eliminated in order to be able >> to subclass base types. So why doesn't this work? > > slice.__base__ == object. It's the basetype flag issue. You could > propose a patch to make it subclassable.
I'll keep this is mind. It'll have to wait for after the holidays though. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list