This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Typo in array documentation
Type: enhancement Stage: resolved
Components: Documentation Versions:
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Maik Ro, docs@python, steven.daprano
Priority: normal Keywords:

Created on 2017-12-13 10:13 by Maik Ro, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg308195 - (view) Author: Maik Ro (Maik Ro) Date: 2017-12-13 10:13
.. class:: array(typecode[, initializer])

should be 

typecode, [initializer] - comma is in square brackets
msg308197 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2017-12-13 11:06
The given version is correct: the comma is only required if the initializer is given. Your suggested version 

    typecode, [initializer]

implies that the comma is always required whether the initializer is given or not.

If we want to be absolutely pedantic, we could write:

    .. class:: array(typecode[, [initializer]])

as trailing commas are legal in function calls. But I don't think that makes for good documentation.
Date User Action Args
2022-04-11 14:58:55adminsetgithub: 76482
2017-12-13 11:06:50steven.dapranosetstatus: open -> closed

nosy: + steven.daprano
messages: + msg308197

resolution: rejected
stage: resolved
2017-12-13 10:13:31Maik Rocreate