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.
Created on 2008年12月07日 21:44 by msyang, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg77264 - (view) | Author: Michael Yang (msyang) | Date: 2008年12月07日 21:44 | |
doctest.testmod() fails when attempting to echo back a bytes type with ord() > 128. def ok(): """ >>> bytes([255,]) b'\xff' """ pass def notOK(): """ >>> b'\xff' """ pass import doctest doctest.testmod() Traceback (most recent call last): ... UnicodeEncodeError: 'ascii' codec can't encode character '\xff' in position 141: ordinal not in range(128) |
|||
| msg77268 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2008年12月07日 22:01 | |
You've included a chr(255) character in your docstring. You need to escape the backslash in order to include the bytes representation like it will be generated. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:42 | admin | set | github: 48834 |
| 2008年12月07日 22:01:06 | georg.brandl | set | status: open -> closed resolution: not a bug messages: + msg77268 nosy: + georg.brandl |
| 2008年12月07日 21:44:06 | msyang | create | |