Consolidate guidance on prompts in interactive code examples
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 50/100
- Issue-Typ
- Dokumentation
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- documentation
Rechercherichtung
Öffne zuerst die verlinkten Abschnitte „Style Guide / Code Examples“ und „reStructured Text Markup / Showing Code Examples“. Führe ihre Hinweise zu interaktiven Eingabeaufforderungen an einer Stelle zusammen, füge an der anderen Stelle einen Verweis hinzu und stelle sicher, dass die daraus entstehenden Hinweise sekundäre Eingabeaufforderungen, doctesting und das ungenutzte Beispiel für die primäre Eingabeaufforderung abdecken.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
In the Documentation chapter, Style Guide / Code Examples has
The ellipsis for the sys.ps2 secondary interpreter prompt should only be used sparingly, where it is necessary to clearly differentiate between input lines and output lines. Besides contributing visual clutter, it makes it difficult for readers to cut-and-paste examples so they can experiment with variations.
(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
Representing an interactive session requires including the prompts and output along with the Python code. No special markup is required for interactive sessions. After the last line of input or output presented, there should not be an “unused” primary prompt; this is an example of what not to do:
>>>1 + 1
2
>>>
I think both advices should be in the same place and a reference added in the other.
- Vorherrschende Sprache
- Python
- Sterne
- 2.1k
- Forks
- 1k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 12
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus python/devguide
-
type-feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
type-feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
topic-building python type-feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
needs: decision topic-test type-bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
topic-dev process type-feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Alle Issues in python/devguide
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
learningequality/ricecooker#747 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
run-llama/llama_index#23199 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
KhronosGroup/glTF-Blender-IO#2769 ·