[issue11231] bytes() constructor is not correctly documented

STINNER Victor report at bugs.python.org
Thu Feb 17 17:55:39 CET 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> These are AFAIR the same.

So the docstring should also maybe be updated too:

$ python
>>> help(bytes)
Help on class bytes in module builtins:

class bytes(object)
 |  bytes(iterable_of_ints) -> bytes
 |  bytes(string, encoding[, errors]) -> bytes
 |  bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer
 |  bytes(memory_view) -> bytes
 |  
 |  Construct an immutable array of bytes from:
 |    - an iterable yielding integers in range(256)
 |    - a text string encoded using the specified encoding
 |    - a bytes or a buffer object
 |    - any object implementing the buffer API.
 |  
...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11231>
_______________________________________


More information about the Python-bugs-list mailing list