[issue38333] add type signatures to library function docs
New submission from paul rubin
Raymond Hettinger
Change by Raymond Hettinger
Guido van Rossum
Vedran Čačić
Many docs are ... vague about types.
... and I consider that a feature. At least if you do that, make an explicit decision not to introduce TypeErrors for "disagreeing with the documented signature".
For example, I'd be ok with sum being documented as taking an iterable of numbers and returning a number, but it would be a catastrophe if as a consequence of that, sum of a list of lists would stop working.
----------
nosy: +veky
_______________________________________
Python tracker
Guido van Rossum
Vedran Čačić
added the comment: Many docs are ... vague about types.
... and I consider that a feature. At least if you do that, make an explicit decision not to introduce TypeErrors for "disagreeing with the documented signature".
For example, I'd be ok with sum being documented as taking an iterable of numbers and returning a number, but it would be a catastrophe if as a consequence of that, sum of a list of lists would stop working.
---------- nosy: +veky
_______________________________________ Python tracker
https://bugs.python.org/issue38333 _______________________________________
--
--Guido (mobile)
----------
_______________________________________
Python tracker
paul rubin
Guido van Rossum
Vedran Čačić
paul rubin
Vedran Čačić
paul rubin
Vedran Čačić
paul rubin
Vedran Čačić
Guido van Rossum
Change by Guido van Rossum
participants (4)
-
Guido van Rossum
-
paul rubin
-
Raymond Hettinger
-
Vedran Čačić