Title: tutorial: list is a class
Type: Stage: resolved
Components: Documentation Versions: Python 3.9
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: andyharrington, docs@python, rhettinger
Priority: normal Keywords:

Created on 2020-11-15 01:20 by andyharrington, last changed 2020-11-15 01:28 by rhettinger. This issue is now closed.

Messages (2)
msg380997 - (view) Author: Andy Harrington (andyharrington) Date: 2020-11-15 01:20
Documentation in Tutorial section 9.3.3 seems to be stuck in Python 2:

"In Python, the term method is not unique to class instances: other object types can have methods as well. For example, list objects have methods called append, insert, remove, sort, and so on."

In Python 3 built-in types are derived from Object, so list is now a class, right?
msg380998 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2020-11-15 01:28
I think the current wording is fine.  After the type/class unification we tend to use the words "type" and "class" almost interchangeably.  For builtins, we still tend to say type though.

The language itself tends to mix the terms as well:

>>> class A:

>>> type(A)
<class 'type'>
>>> type(list)
<class 'type'>
Date User Action Args
2020-11-15 01:28:27rhettingersetstatus: open -> closed

nosy: + rhettinger
messages: + msg380998

resolution: not a bug
stage: resolved
2020-11-15 01:20:27andyharringtoncreate