python / python/devguide

Consolidate guidance on prompts in interactive code examples

Abierto
#1,135 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

help wanted topic-documentation type-bug type-feature
Lenguaje dominante
Python
Estrellas
2.1k
Forks
1k
Merge medio
2 d 12 h
PR fusionados (30 d)
12

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Abre primero las secciones enlazadas „Style Guide / Code Examples“ y „reStructured Text Markup / Showing Code Examples“. Consolida sus indicaciones sobre los prompts interactivos en un solo lugar, añade una referencia en el otro y asegúrate de que las indicaciones resultantes cubran los prompts secundarios, el doctesting y el ejemplo de prompt primario no utilizado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
documentation
Tipo de issue
Documentación
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
50/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.