Steven D'Aprano <steve+pyt...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue32301>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to