[Doc-SIG] Proposal: don't nest optional brackets

Forest list8a.forest at tibit.com
Thu Sep 25 19:08:06 CEST 2008


On Wed, September 24, 2008 10:21 am, A.M. Kuchling wrote:
>
> .. method:: socket.recv_into(buffer[, nbytes[, flags]])

Straying slightly from the issue of keyword arguments, I'd like to point
out that the nested brackets imply to me that the flags arg requires the
nbytes arg to be present as well.  Compare to your suggestions:

> * Add '=' after parameters that can be provided as keywords:
>   buffer=, [nbytes=, flags=] ...
>
> * Write keyword arguments as unnested square brackets:
>   (buffer[, nbytes][, flags])

Neither of those notations conveys a dependence of one argument on the other.




More information about the Doc-SIG mailing list