Re: Proposal: don't nest optional brackets

"Forest" <[email protected]>
Newsgroups gmane.comp.python.documentation
Message-ID <[email protected]>
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.


_______________________________________________
Doc-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/doc-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.