[New-bugs-announce] [issue4178] codecs: Documentation Inconsistency

Michael Witten report at bugs.python.org
Wed Oct 22 21:51:23 CEST 2008

New submission from Michael Witten <mfwitten at mit.edu>:

CodecInfo objects are supposed to have 'encoder' and 'decoder' 
attributes as per http://www.python.org/doc/2.5.2/lib/module-codecs.html 
(naturally, this applies to 2.5.* as well). However, at least the 
CodecInfo object for 'string_escape' names these attributes 'encode' and 

>>> import codecs
>>> dir(codecs.lookup('string_escape'))
['__add__', '__class__', '__contains__', '__delattr__', '__dict__', 
'__doc__', '__eq__', '__ge__', '__getattribute__', '__getitem__', 
'__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', 
'__iter__', '__le__', '__len__', '__lt__', '__module__', '__mul__', 
'__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', 
'__rmul__', '__setattr__', '__str__', 'decode', 'encode', 
'incrementaldecoder', 'incrementalencoder', 'name', 'streamreader', 

components: Library (Lib)
messages: 75104
nosy: mfwitten
severity: normal
status: open
title: codecs: Documentation Inconsistency
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list