Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Pydoc uses the backslashreplace error handler for characters not encodable with 
the output encoding (see issue21398 and issue23374).

$ LC_ALL=uk_UA.koi8-u ./python -c "help('async')"
[...]

[2] A string literal appearing as the first statement in the
    function body is transformed into the function\u2019s "__doc__"
    attribute and therefore the function\u2019s *docstring*.

[3] A string literal appearing as the first statement in the class
    body is transformed into the namespace\u2019s "__doc__" item and
    therefore the class\u2019s *docstring*.


It would be better to replace non-ASCII quotation marks and dashes with 
corresponding ASCII quotation marks and hyphen-minus if they cannot be encoded. 
It may be a part of more general feature for transliterating non-ASCII 
characters to ASCII.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to