Closed mx-psi closed 4 years ago
Thanks for informing us, I will look into these and add appropriate notes whenever possible. If you have more examples of this, you could either note them in the comments here or open a PR adding a line in each snippet's explanation, just before the code block noting that:
[`function.name`](library-link-to-function-name) provides similar functionality to this snippet.
Okay! I will check for other possible examples and open a PR
The Python Standard Library has functions with similar behavior to some snippets. In particular:
str.splitlines
method (the latter being more general and omitting the last line) anditertools.zip_longest
function (the latter returning an iterator instead of a list).The functions don't have the exact same behavior, so it might make sense to keep them, but I believe it would be helpful for visitors to at least have a reference to the standard library version in the snippet documentation; that way they can choose the option that best fits their needs.