Re: subclassable types

Discussion in 'Python' started by Terry Reedy, Feb 22, 2013.

  1. Terry Reedy

    Terry Reedy Guest

    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
    Terry Reedy, Feb 22, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wolfgang Maier

    subclassable types

    Wolfgang Maier, Feb 22, 2013, in forum: Python
    Replies:
    1
    Views:
    83
    Steven D'Aprano
    Feb 22, 2013
  2. Sven

    Re: subclassable types

    Sven, Feb 22, 2013, in forum: Python
    Replies:
    0
    Views:
    74
  3. Wolfgang Maier

    Re: subclassable types

    Wolfgang Maier, Feb 22, 2013, in forum: Python
    Replies:
    0
    Views:
    81
    Wolfgang Maier
    Feb 22, 2013
  4. Wolfgang Maier

    Re: subclassable types

    Wolfgang Maier, Feb 24, 2013, in forum: Python
    Replies:
    0
    Views:
    91
    Wolfgang Maier
    Feb 24, 2013
  5. Wolfgang Maier

    Re: subclassable types

    Wolfgang Maier, Feb 24, 2013, in forum: Python
    Replies:
    0
    Views:
    104
    Wolfgang Maier
    Feb 24, 2013
Loading...

Share This Page