Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39619

Re: subclassable types

From Terry Reedy <tjreedy@udel.edu>
Subject Re: subclassable types
Date 2013-02-22 17:10 -0500
References <loom.20130222T101853-588@post.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.2307.1361571054.2939.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: subclassable types Terry Reedy <tjreedy@udel.edu> - 2013-02-22 17:10 -0500

csiph-web