subclassable types

Terry Reedy tjreedy at
Fri Feb 22 23:10:07 CET 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.

Terry Jan Reedy

More information about the Python-list mailing list