Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: subclassable types

Reply
Thread Tools

Re: subclassable types

 
 
Wolfgang Maier
Guest
Posts: n/a
 
      02-24-2013
> The complete list of types classes that *cannot* be subclassed is:
>
> <class 'builtin_function_or_method'>
> <class 'code'>
> <class 'frame'>
> <class 'function'>
> <class 'generator'>
> <class 'getset_descriptor'>
> <class 'function'>
> <class 'mappingproxy'>
> <class 'member_descriptor'>
> <class 'method'>
> <class 'traceback'>
> <class 'range'>
> <class 'memoryview'>
> <class 'slice'>
> <class 'bool'>
>
> of these range, memoryview, slice and bool are the only ones in builtins.


I am sorry,
but again I forgot to say which Python version I'm referring to:
I used Python 3.3

Having such a list in the docs somewhere, is certainly a good idea.

Cheers,
Wolfgang


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: subclassable types Wolfgang Maier Python 0 02-24-2013 04:23 PM
Re: subclassable types Terry Reedy Python 0 02-22-2013 10:10 PM
subclassable types Wolfgang Maier Python 1 02-22-2013 10:54 AM
Re: subclassable types Wolfgang Maier Python 0 02-22-2013 10:00 AM
Re: subclassable types Sven Python 0 02-22-2013 09:54 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57