[Python-Dev] type vs. class terminology

Hrvoje Niksic hrvoje.niksic at avl.com
Mon Nov 26 09:04:21 CET 2012

On 11/26/2012 06:01 AM, Chris Jerdonek wrote:
> I would like to know when we should use "class" in the Python 3
> documentation, and when we should use "type."  Are these terms
> synonymous in Python 3, and do we have a preference for which to use
> and when?

Some people like to use "class" for the subset of types created by 
Python's "class" statement or its moral equivalent (explicit invocation 
of the metaclass). It makes sense that "class" is used to create 
classes. The word "type" then refers to both classes and built-in and 
extension types, such as "list" or "array.array".

More information about the Python-Dev mailing list