Uh oh!
There was an error while loading. Please reload this page.
gh-101118: correct function signatures in the math module docs - #101120
gh-101118: correct function signatures in the math module docs#101120skirpichev wants to merge 1 commit into
Conversation
sobolevn
left a comment
There was a problem hiding this comment.
Right now we haven't decided yet what to do with positional only args in the docs.
Some maintainers add them, some later remove them, some prefer not to touch it.
This is just for the context for this change :)
rhettinger
commented
Jan 18, 2023
There was a decision not to add these to the docs because lay readers mostly find them confusing, because it makes the docs harder to read, and there are no known usability issues with the docs as they are now. So exceptions have been made for functions likes |
Well, the inspect module does very clear distinction: >>>deffoo(x): pass# like e.g. math.ceil shown in docs
... >>>defbar(x, /): pass
... >>>inspect.signature(foo)
<Signature (x)>>>>inspect.signature(bar)
<Signature (x, /)>>>>foo(x=1)
>>>bar(x=1) # that's how math,ceil behave in the realityTraceback (mostrecentcalllast):
File"<stdin>", line1, in<module>TypeError: bar() gotsomepositional-onlyargumentspassedaskeywordarguments: 'x'
The os module seems to be one using "/". I doubt that the Sorry for the nitpick, anyway. |
Uh oh!
There was an error while loading. Please reload this page.