subclassable types

Terry Reedy tjreedy at udel.edu
Fri Feb 22 17:10:07 EST 2013


On 2/22/2013 4:35 AM, Wolfgang Maier wrote:
> Dear all,
> I am wondering what the rules are that determine whether a built-in type is
> subclassable or not.
> As examples, why can you base your classes on int or set,
> but not on bool or range?
> Also: can you use introspection to find out whether a type is valid as a
> base type?

You are not the first to ask about this. I opened a doc issue.
http://bugs.python.org/issue17279

-- 
Terry Jan Reedy




More information about the Python-list mailing list