Ticket #6070 enhancement new
Add a function like chr that always returns a byte string
| Reported by: | exarkun | Owned by: | meissenPlate |
|---|---|---|---|
| Priority: | normal | Milestone: | Python-3.x |
| Component: | core | Keywords: | |
| Cc: | Branch: | ||
| Author: | Launchpad Bug: |
Description
Python 2 chr returns an instance of str (byte string). Python 3 chr returns an instance of str (text string). There's no obvious polyglot expression of the Python 2 version of the behavior, so we should have an API that takes care of the differences between Python 2 and Python 3 for this behavior.
At least twisted.python.randbytes and twisted.names.dns want to use this.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

