rfmonk

EX_re_groups_nested.py

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