[issue34451] docs: tutorial/introduction doesn't mention toggle of prompts

New submission from Jonathan Fine jfine2358@gmail.com:
Interactive code examples need the prompt to be stripped, before copy-and-paste. This is explained in https://docs.python.org/3/tutorial/introduction.html
But this page does not tell us about the [>>>] prompt-toggle at top of each interactive code example. This caused a user error, reported in https://mail.python.org/pipermail/python-ideas/2018-August/052869.html.
The [>>>] toggle isn't in the Python 2.7 docs, so nothing to fix there!
---------- assignee: docs@python components: Documentation messages: 323839 nosy: docs@python, jfine2358 priority: normal severity: normal status: open title: docs: tutorial/introduction doesn't mention toggle of prompts versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue34451 _______________________________________

Change by Irit Katriel iritkatriel@yahoo.com:
---------- keywords: +easy versions: +Python 3.10, Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 3.7
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue34451 _______________________________________

Change by Irit Katriel iritkatriel@yahoo.com:
---------- type: -> enhancement
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue34451 _______________________________________

Raymond Hettinger raymond.hettinger@gmail.com added the comment:
The toggle option is only in the HTML version with javascript enabled. It would apply to PDF renderings or CHM files etc.
---------- nosy: +rhettinger
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue34451 _______________________________________

Raymond Hettinger raymond.hettinger@gmail.com added the comment:
- It would apply to PDF renderings or CHM files etc. + We wouldn't the the proposed text to be visible in PDF renderings or CHM files etc.
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue34451 _______________________________________

Change by Rahul Jha rahul722j@gmail.com:
---------- nosy: +RJ722
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue34451 _______________________________________

David Justo david.justo.1996@gmail.com added the comment:
Hi folks! I'm interested in contributing to this issue, but I'm unsure about the context.
Can `>>>>` prompts be toggled on-and-off in the docs? I do not see that option. I read that this is possible in javascript-enabled versions of the site, but isn't that the default? If so, I have JS enabled and I do not see how to toggle them out :) . Maybe that's part of what we need to fix as well.
Thanks for your time!
---------- nosy: +davidmrdavid
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue34451 _______________________________________
participants (5)
-
David Justo
-
Irit Katriel
-
Jonathan Fine
-
Rahul Jha
-
Raymond Hettinger