[issue1365] bytes(<int>) constructor

Christian Heimes report at bugs.python.org
Wed Oct 31 10:50:11 CET 2007


New submission from Christian Heimes:

Hey Guido!

During my testing and local modifications of the PEP 3137 branch I found
a bunch of unit tests that were choking on bytes(1) where bytes is PyString.

The PEP doesn't list bytes(<int>) as a valid constructor, only
buffer(<int>). I don't see a reason why bytes() shouldn't accept an int
when b'1' still creates a byte sequence with 3 elements. Here is a patch

----------
components: Interpreter Core
messages: 56990
nosy: gvanrossum, tiran
severity: normal
status: open
title: bytes(<int>) constructor
type: rfe
versions: Python 3.0

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1365>
__________________________________


More information about the Python-bugs-list mailing list