Advertisement
rfmonk

EX_re_test_patterns2.py

Jan 2nd, 2014
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. """
  2. ~/Python $ python re_test_patterns2.py
  3. Pattern 'ab' ('a' followed by 'b')
  4.  
  5. 'abbaaabbbbaaaaa'
  6. Traceback (most recent call last):
  7.  File "re_test_patterns2.py", line 29, in <module>
  8.    [('ab', "'a' followed by 'b'"),
  9.  File "re_test_patterns2.py", line 19, in test_patterns
  10.    print ' %s%r' % (prefix, text[s:e], ' ' * (len(text) - e)),
  11. TypeError: not all arguments converted during string formatting
  12. """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement