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: Docstring for codecs.lookup is incorrect
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: doerwalter, massysett
Priority: normal Keywords:

Created on 2007-07-15 21:13 by massysett, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg32510 - (view) Author: Omari Norman (massysett) Date: 2007-07-15 21:13
The docstring for codecs.lookup states that this function returns a tuple of functions. I understand this was correct in Python 2.4, but in Python 2.5 this function returns a CodecInfo object, as described in the docs:

http://docs.python.org/lib/module-codecs.html

I've got Python 2.5.1.
msg32511 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2007-07-19 13:05
CodecInfo objects *are* tuples for backwards compatibility reasons. Also it's still possible that codecs.lookup() returns a real tuple (however all standard encoding go through encodings.search_function() so if codec.getregentry() returns a real tuple this gets upgraded to a CodecInfo object.)

I've changed the docstring in r56456, so that it mentions both tuples and CodecInfo objects.
History
Date User Action Args
2022-04-11 14:56:25adminsetgithub: 45202
2007-07-15 21:13:24massysettcreate