[Python-checkins] cpython (3.2): Further beautification of the example
raymond.hettinger
python-checkins at python.org
Fri May 13 10:39:31 CEST 2011
http://hg.python.org/cpython/rev/486112dcba0c
changeset: 70073:486112dcba0c
branch: 3.2
parent: 70071:512f638dc9e9
user: Raymond Hettinger <python at rcn.com>
date: Fri May 13 01:38:31 2011 -0700
summary:
Further beautification of the example
files:
Doc/library/re.rst | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -1331,12 +1331,15 @@
if pos != len(s):
raise RuntimeError('Unexpected character %r on line %d' %(s[pos], line))
- >>> statements = '''\
+ statements = '''\
total := total + price * quantity;
tax := price * 0.05;
'''
- >>> for token in tokenize(statements):
- print(token)
+
+ for token in tokenize(statements):
+ print(token)
+
+The tokenizer produces the following output::
Token(typ='ID', value='total', line=1, column=8)
Token(typ='ASSIGN', value=':=', line=1, column=14)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list