mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
text-wrapping; source code highlighting
This commit is contained in:
@@ -61,10 +61,18 @@ Sub section headings::
|
|||||||
Very Deep
|
Very Deep
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
|
Prose
|
||||||
|
-----
|
||||||
|
|
||||||
|
Wrap text lines at 78 characters. Where necessary, lines may exceed 78
|
||||||
|
characters, especially if wrapping would make the source text more difficult
|
||||||
|
to read.
|
||||||
|
|
||||||
|
|
||||||
Code Examples
|
Code Examples
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Wrap all code examples within 70 characters to avoid horizontal scrollbars.
|
Wrap all code examples at 70 characters to avoid horizontal scrollbars.
|
||||||
|
|
||||||
Command line examples::
|
Command line examples::
|
||||||
|
|
||||||
@@ -79,12 +87,16 @@ Python interpreter examples::
|
|||||||
|
|
||||||
Label the example::
|
Label the example::
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
>>> import this
|
>>> import this
|
||||||
|
|
||||||
Python examples::
|
Python examples::
|
||||||
|
|
||||||
Descriptive title::
|
Descriptive title::
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
def get_answer():
|
def get_answer():
|
||||||
return 42
|
return 42
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user