Add a function like chr that always returns a byte string
|Reported by:||exarkun||Owned by:||meissenPlate|
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.
Change History (19)
comment:1 Changed 4 years ago by meissenPlate
- Owner set to meissenPlate
- Status changed from new to assigned
comment:3 Changed 4 years ago by exarkun
- Owner meissenPlate deleted
- Status changed from assigned to new