bpo-37684: Improved list.extend example in datastructures docs by wimglenn · Pull Request #14951 · python/cpython (original) (raw)

Contributor

@aeros aeros left a comment • Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wimglenn Thanks for the contribution! I agree that a skip news label would be appropriate for this PR.

I agree that the suggested changes would provide a significant improvement from the current code example, but since this is in the tutorial, I think it would be helpful to provide a more detailed example showing outputs from the interpreter. This is less commonly done in the rest of the docs, but the tutorial tends to prefer the usage of more detailed examples (often times with some fun theming).

The one line equivalent seems like it would be more suitable to the library docs, rather than the tutorial. A visual example with the interpreter would be significantly more informative to newer users of Python, which is the main target audience of the tutorial.