Open terryjreedy opened 1 year ago
FWIW I think the first paragraph predates the [>>>]
button at the top right of interactive code examples, which I added to make it easier to copy[^1]-and-paste. On one hand the button requires an extra click and people might not notice it, so there is still some advantage of leaving the secondary prompts out, but on the other hand the lack of secondary prompts looks inconsistent with the actual interactive interpreter and might create confusion and -- as you mentioned -- it also breaks doctests.
Omitting the "unused" prompt at the end is a good advice.
[^1]: the quoted text uses cut which seems wrong here.
Hi @willingc, I will work on this issue, will omit the "unused" prompt
PR: https://github.com/python/devguide/pull/1210
request you to please review
In the Documentation chapter, Style Guide / Code Examples has
(Perhaps it should be mentioned here that doctesting the code example requires such differentiation and hence requires secondary prompts. Perhaps the primary prompt should also be left off.)
reStructured Text Markup / Additional Markup Constructs / Showing Code Examples has