diff options
author | Raymond Hettinger <python@rcn.com> | 2011-05-13 08:38:31 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-05-13 08:38:31 (GMT) |
commit | 23157e5ddcbca17b1c83fefa058e66058de787c9 (patch) | |
tree | 72504d173129beccaf73cc5d5eeaf54822f1f4e9 /Doc/library/re.rst | |
parent | 9c47d778f7d9e166c18d8b86f84a2065126c06c6 (diff) | |
download | cpython-23157e5ddcbca17b1c83fefa058e66058de787c9.zip cpython-23157e5ddcbca17b1c83fefa058e66058de787c9.tar.gz cpython-23157e5ddcbca17b1c83fefa058e66058de787c9.tar.bz2 |
Further beautification of the example
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r-- | Doc/library/re.rst | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 6df3106..e10c794 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -1331,12 +1331,15 @@ successive matches:: 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) |