[Python-checkins] cpython: Split combined code/doctest code blocks in two blocks, to enable proper
georg.brandl
python-checkins at python.org
Sun May 1 22:37:59 CEST 2011
http://hg.python.org/cpython/rev/b9e04043568e
changeset: 69736:b9e04043568e
user: Georg Brandl <georg at python.org>
date: Sun May 01 22:34:31 2011 +0200
summary:
Split combined code/doctest code blocks in two blocks, to enable proper highlighting.
files:
Doc/tutorial/classes.rst | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -754,6 +754,8 @@
self.index = self.index - 1
return self.data[self.index]
+::
+
>>> rev = Reverse('spam')
>>> iter(rev)
<__main__.Reverse object at 0x00A1DB50>
@@ -782,6 +784,8 @@
for index in range(len(data)-1, -1, -1):
yield data[index]
+::
+
>>> for char in reverse('golf'):
... print(char)
...
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list