Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/usage/restructuredtext/directives.rst
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,9 @@ __ https://pygments.org/docs/lexers

def some_function():
interesting = False
print 'This line is highlighted.'
print 'This one is not...'
print '...but this one is.'
print('This line is highlighted.')
print('This one is not...')
print('...but this one is.')

.. versionadded:: 1.1
.. versionchanged:: 1.6.6
Expand Down Expand Up @@ -576,7 +576,7 @@ __ https://pygments.org/docs/lexers
:caption: this.py
:name: this-py

print 'Explicit is better than implicit.'
print('Explicit is better than implicit.')

In order to cross-reference a code-block using either the
:rst:role:`ref` or the :rst:role:`numref` role, it is necessary
Expand Down
4 changes: 2 additions & 2 deletions doc/usage/restructuredtext/roles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ different style:

A piece of literal text, such as code. Within the contents, you can use
curly braces to indicate a "variable" part, as in :rst:role:`file`. For
example, in ``:samp:`print 1+{variable}```, the part ``variable`` would be
emphasized: :samp:`print 1+{variable}`
example, in ``:samp:`print(1+{variable})```, the part ``variable`` would be
emphasized: :samp:`print(1+{variable})`

If you don't need the "variable part" indication, use the standard
:rst:role:`code` role instead.
Expand Down