Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: subclassable types (http://www.velocityreviews.com/forums/t958014-re-subclassable-types.html)

Wolfgang Maier 02-24-2013 04:38 PM

Re: subclassable types
 
> 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




All times are GMT. The time now is 05:10 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.