Message169726
Attaching a proposed patch for the default branch. Also, here are several comments and questions.
> I think/hope that all the APIs we have in the stdlib are sane enough to have no more than 2-3 signatures
I found this one in the curses module with four:
window.chgat(attr)
window.chgat(num, attr)
window.chgat(y, x, attr)
window.chgat(y, x, num, attr)
Do we like how these look? Is the bare star notation too obscure?
inspect.Signature.replace(*[, parameters][, return_annotation])
inspect.Parameter.replace(*[, name][, kind][, default][, annotation])
I was curious what the preferred way to display the following is, since I don't think any comma/bracket placement will work:
ArgumentParser([description][, epilog][, prog][, usage][, add_help][, argument_default][, parents][, prefix_chars][, conflict_handler][, formatter_class])
(unless perhaps we use the construction "ArgumentParser(*[, description][, epilog]....")
I'm not sure how we want to handle this one using multiple signatures:
multiprocessing.Process([group[, target[, name[, args[, kwargs]]]]], *, daemon=None)
I put my preferred rendering in the patch, but Sphinx re-renders it in its own way.
I also noticed these more unusual signatures:
urllib.request.urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=True)
http.client.HTTPSConnection(host, port=None, key_file=None, cert_file=None[, strict[, timeout[, source_address]]], *, context=None, check_hostname=None)
By the way, is the * really necessary in these examples? |
|
Date |
User |
Action |
Args |
2012-09-02 22:33:55 | chris.jerdonek | set | recipients:
+ chris.jerdonek, georg.brandl, ezio.melotti, eric.araujo, asvetlov, docs@python |
2012-09-02 22:33:54 | chris.jerdonek | set | messageid: <1346625234.47.0.909901441507.issue15831@psf.upfronthosting.co.za> |
2012-09-02 22:33:53 | chris.jerdonek | link | issue15831 messages |
2012-09-02 22:33:53 | chris.jerdonek | create | |
|