This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Obsolete info in Tutorial 9.1
Type: Stage:
Components: Documentation Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jlgijsbers, kjohnson, rhettinger, terry.reedy
Priority: normal Keywords:

Created on 2004-11-15 22:50 by kjohnson, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg23158 - (view) Author: Kent Johnson (kjohnson) * Date: 2004-11-15 22:50
In the Tutorial, section 9.1, the second paragraph
(starting with "I also have to warn you") is obsolete -
integers and list are now instances of <type 'int'> and
<type 'list'> if I understand correctly.

For a brief discussion on c.l.python see
0411150401.2b215499%40posting.google.com&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26c2coff%3D1%26group%3Dcomp.lang.python">http://groups.google.com/groups?hl=en&lr=&c2coff=1&threadm=ad052e5c.0411150401.2b215499%40posting.google.com&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26c2coff%3D1%26group%3Dcomp.lang.python

Kent
msg23159 - (view) Author: Johannes Gijsbers (jlgijsbers) * (Python triager) Date: 2004-11-16 20:51
Logged In: YES 
user_id=469548

This isn't really obsolete, technically speaking. Types look
a lot more like classes since Python 2.2, but they're not
the same. I don't know whether we still want to introduction
in the tutorial, though, so I'm leaving this open for now.
msg23160 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2004-11-17 19:03
Logged In: YES 
user_id=593130

Instances of builtin types were always just that.  So this is 
not new.  What is new in 2.2 (I think) is that they gained 
a .__class__ attribute pointing to the type.
>>> 1 .__class__
<type 'int'>

In addition, the builtin types, including type itself, are now 
subclasses of object (via their __bases__ attribute), even 
though their .__class__ attributes point to type instead.

>>> issubclass(int, object)
1
>>> int.__bases__
(<type 'object'>,)
>>> int.__class__
<type 'type'>

So I think the warning, as now written, is arguably untrue, 
or at least confusing rather than helpful.
msg23161 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2004-11-18 06:22
Logged In: YES 
user_id=80475

Zapped the useless and confusing paragraph.
History
Date User Action Args
2022-04-11 14:56:08adminsetgithub: 41176
2004-11-15 22:50:42kjohnsoncreate