homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients docs@python, eli.bendersky, eric.araujo, eric.smith, ezio.melotti, georg.brandl
Date 2011年11月14日.05:11:06
SpamBayes Score 3.9730254e-05
Marked as misclassified No
Message-id <1321247466.98.0.478442835897.issue13386@psf.upfronthosting.co.za>
In-reply-to
Content
> You should also explicitly specify what happens in several optional but 
> not keyword args are needed. AFAIU the convention is:
> func(arg1, arg2[, opt1, opt2])
IIUC that would mean that either you pass only arg1 and arg2, or you also pass both opt1 and opt2.
I think the correct notation for that is e.g.:
 str.startswith(prefix[, start[, end]])
I also saw "func(foo[, bar][, baz])" for cases where either bar or baz can be passed, but since this requires keyword arguments, the "func(foo, bar=x, baz=y)" notation should be used instead, and the documentation should then explain that either one can be passed.
I also agree with what you said in your last message. What can't be expressed with a notation can always be described with words.
History
Date User Action Args
2011年11月14日 05:11:07ezio.melottisetrecipients: + ezio.melotti, georg.brandl, eric.smith, eric.araujo, eli.bendersky, docs@python
2011年11月14日 05:11:06ezio.melottisetmessageid: <1321247466.98.0.478442835897.issue13386@psf.upfronthosting.co.za>
2011年11月14日 05:11:06ezio.melottilinkissue13386 messages
2011年11月14日 05:11:06ezio.melotticreate

AltStyle によって変換されたページ (->オリジナル) /