BPO | [32301](https://bugs.python.org/issue32301) --- | :--- Nosy | @stevendaprano *Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.* Show more details GitHub fields: ```python assignee = None closed_at = created_at = labels = ['type-feature', 'docs'] title = 'Typo in array documentation' updated_at = user = 'https://bugs.python.org/MaikRo' ``` bugs.python.org fields: ```python activity = actor = 'steven.daprano' assignee = 'docs@python' closed = True closed_date = closer = 'steven.daprano' components = ['Documentation'] creation = creator = 'Maik Ro' dependencies = [] files = [] hgrepos = [] issue_num = 32301 keywords = [] message_count = 2.0 messages = ['308195', '308197'] nosy_count = 3.0 nosy_names = ['steven.daprano', 'docs@python', 'Maik Ro'] pr_nums = [] priority = 'normal' resolution = 'rejected' stage = 'resolved' status = 'closed' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue32301' versions = [] ```
Activity
MaikRo commentedon Dec 13, 2017
.. class:: array(typecode[, initializer])
should be
typecode, [initializer] - comma is in square brackets
stevendaprano commentedon Dec 13, 2017
The given version is correct: the comma is only required if the initializer is given. Your suggested version
implies that the comma is always required whether the initializer is given or not.
If we want to be absolutely pedantic, we could write:
as trailing commas are legal in function calls. But I don't think that makes for good documentation.