[docs] Fixed the documentation of the mapping codec APIs (issue 28749)

angwerzx at 126.com angwerzx at 126.com
Thu Nov 24 04:35:22 EST 2016


http://bugs.python.org/review/28749/diff/19217/Doc/c-api/unicode.rst
File Doc/c-api/unicode.rst (right):

http://bugs.python.org/review/28749/diff/19217/Doc/c-api/unicode.rst#newcode1413
Doc/c-api/unicode.rst:1413: decode characters.  The mapping objects
provided must only support the
I don't understand what the 'only' means. It looks to me except
'__getitem__' no other methods could be defined.

http://bugs.python.org/review/28749/diff/19217/Doc/c-api/unicode.rst#newcode1430
Doc/c-api/unicode.rst:1430: cause an error.
Cause an error or not depends on *errors*.

http://bugs.python.org/review/28749/diff/19217/Doc/c-api/unicode.rst#newcode1430
Doc/c-api/unicode.rst:1430: cause an error.
Cause an error or not depends on *errors*.

http://bugs.python.org/review/28749/diff/19217/Doc/c-api/unicode.rst#newcode1442
Doc/c-api/unicode.rst:1442: ``None`` are  treated as "undefined mapping"
and cause an error.
                     ^ redundant space

One more question about this API, why not allow *mapping* be NULL and
default to Latin1? PyUnicode_EncodeCharmap and PyUnicode_DecodeCharmap
both get this behaviour.

http://bugs.python.org/review/28749/


More information about the docs mailing list