by wyattpeak · 6y ago · 0 comments
Take, for example, the definition of the operation s[i:j] in the Python docs: the result is "slice of s from i to j". Is that the same type as the input? Is it an iterator? No information.
I doubt most people are confused about the output, but a reference is specifically for people who are uncertain about how a function works.
But almost every major library follows a convention that's very similar to the cpython docs.
If you're making a language reference, shouldn't it look like the language ?