[docs] [issue11231] bytes() constructor is not correctly documented

STINNER Victor report at bugs.python.org
Thu Feb 17 17:46:44 CET 2011


New submission from STINNER Victor <victor.stinner at haypocalc.com>:

There are 5 different usages of the bytes() constructor:

1) bytes(iterable_of_ints) -> bytes
2) bytes(string, encoding[, errors]) -> bytes
3) bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer
4) bytes(memory_view) -> bytes
5) bytes(int) <=> b'\0' * size

The docstring describes the four first usages, the documentation only (3).
http://docs.python.org/dev/library/functions.html#bytes

Note: bytes(3) accepts 2 other arguments, but I don't think that they are used: bytes(3, 'unused encoding', 'unused errors').

----------
assignee: docs at python
components: Documentation
messages: 128739
nosy: docs at python, haypo
priority: normal
severity: normal
status: open
title: bytes() constructor is not correctly documented
versions: Python 3.1, Python 3.2, Python 3.3

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


More information about the docs mailing list