]> granicus.if.org Git - python/commitdiff
Further beautification of the example
authorRaymond Hettinger <python@rcn.com>
Fri, 13 May 2011 08:38:31 +0000 (01:38 -0700)
committerRaymond Hettinger <python@rcn.com>
Fri, 13 May 2011 08:38:31 +0000 (01:38 -0700)
Doc/library/re.rst

index 6df310659352ba657df0f122b77fdb9740e77ba4..e10c794fd29ea83e091078935d4cc3ce30ace8dd 100644 (file)
@@ -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)