@@ -106,6 +106,48 @@ Unix
106106 The name of the operating system developed at AT&T Bell Labs in the early
107107 1970s.
108108
109+ Diátaxis
110+ ========
111+
112+ Python's documentation strives to follow the `Diátaxis <https://diataxis.fr/ >`_
113+ framework. This means adapting the writing style according to the nature of
114+ the documentation that is being written. The framework splits
115+ documentation into four distinct types: tutorials, how-to guides, reference, and
116+ explanation.
117+
118+ * :ref: `python:tutorial-index ` should
119+ be explicit and avoid making assumptions about the
120+ reader's knowledge. The goal of a tutorial is to get the user writing
121+ Python code as quickly as possible with clear logical steps. Explanations
122+ and abstract concepts should be avoided. Please consult the Diátaxis guide on
123+ :ref: `diataxis:tutorials ` for more detail.
124+
125+ * `Python how-to guides <https://docs.python.org/3/howto/index.html >`_ are
126+ designed to guide a user through a problem-field.
127+ Both tutorials and how-to guides are instructional rather than explanatory
128+ and should provide logical steps on how to complete a task. However,
129+ how-to guides make more assumptions about the user's knoweldge and
130+ focus on the user finding the best way to solve their own
131+ particular problem.
132+
133+ * :ref: `python:reference-index ` should
134+ be factual and succinct. The purpose of reference documentation is
135+ to describe rather than to explain. Accuracy and consistency are key as
136+ this type of documentation should be seen as an authoritative source.
137+ :ref: `Code-examples ` can be a useful way of achieving these
138+ objectives.
139+
140+ * Python explanations provide
141+ a deeper level of understanding and are naturally more discursive. They aim
142+ to deepen the reader's understanding and answer 'why' questions. They should
143+ provide context, make connections between topics, and discuss alternative
144+ opinions. There is no section dedicated to explanations but these can be
145+ found throughout Python's documentation, for example the
146+ :ref: `python:unicode-howto `
147+
148+ Please consult the `Diátaxis <https://diataxis.fr/ >`_ guide for more
149+ detail.
150+
109151Affirmative tone
110152================
111153
@@ -163,6 +205,8 @@ module (e.g. OS level pipe buffers filling up and stalling child processes),
163205these can be documented in a "Common Errors" section and cross-referenced
164206rather than repeated for every affected interface.
165207
208+ .. _code-examples :
209+
166210Code examples
167211=============
168212
0 commit comments