classification
Title: Document byte[s|array]() and byte[s|array](count) in docstrings
Type: Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: bytes() constructor is not correctly documented
View: 11231
Assigned To: docs@python Nosy List: docs@python, eric.araujo, r.david.murray, terry.reedy
Priority: normal Keywords: patch

Created on 2011-02-24 18:28 by terry.reedy, last changed 2012-03-30 21:45 by r.david.murray. This issue is now closed.

Files
File name Uploaded Description Edit
zbytes.diff terry.reedy, 2011-02-24 18:28 review
Messages (3)
msg129299 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-02-24 18:28
The entry for bytearray(source...) says
"
The optional source parameter can be used to initialize the array in a few different ways:
...
If it is an integer, the array will have that size and will be initialized with null bytes. 
...
Without an argument, an array of size 0 is created.
"
[integer must be non-negative -- patch adds this]
The entry for bytes(source...) refers back to the bytearray entry.

The docstrings for bytes and bytearray omit both possibilities.
Attached is a possible patch to include them.
msg156740 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-03-25 07:30
I think you could just go ahead and commit your patch.  I don’t remember if the reST docs were changed recently-ish or if it’s still an open bug, so you may want to check that the new docstrings matches the doc.
msg157151 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-03-30 21:45
Duplicate of issue 11231.
History
Date User Action Args
2012-03-30 21:45:07r.david.murraysetstatus: open -> closed

superseder: bytes() constructor is not correctly documented

nosy: + r.david.murray
messages: + msg157151
resolution: duplicate
stage: resolved
2012-03-25 07:30:08eric.araujosetnosy: + eric.araujo

messages: + msg156740
versions: + Python 2.7
2011-02-24 18:28:58terry.reedycreate