[issue32301] Typo in array documentation
New submission from Maik Ro <lefthand3r@googlemail.com>: .. class:: array(typecode[, initializer]) should be typecode, [initializer] - comma is in square brackets ---------- assignee: docs@python components: Documentation messages: 308195 nosy: Maik Ro, docs@python priority: normal severity: normal status: open title: Typo in array documentation type: enhancement _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32301> _______________________________________
Steven D'Aprano <steve+python@pearwood.info> added the comment: 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. ---------- nosy: +steven.daprano resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32301> _______________________________________
participants (2)
-
Maik Ro -
Steven D'Aprano