Ticket #6053 enhancement closed fixed
Create `intToBytes` function for Python 3 compatibility with Python 2
|Reported by:||itamar||Owned by:||itamar|
|Priority:||normal||Milestone:||Python 3.3 Minimal|
(diff, github, buildbot, log)
Description (last modified by itamar) (diff)
On Python 2, it's possible to do things like:
>>> bytes(20) '20'
On Python 3 that will not work. Since we use the above idiom quite a bit, at the very least in tests, we should implement a intToBytes function that emulates this behavior.
Note: See TracTickets for help on using tickets.