Posted by manuelg on Fri 16 May 18:14
report spam | download | new post
- _re_whitespace_alternate = re.compile(r'[ \t\r\n]+|[^ \t\r\n]+')
- __test__['_re_whitespace_alternate'] = r"""
- >>> def f(s):
- ... return _re_whitespace_alternate.findall(s)
- >>> f(' hello ')
- [' ', 'hello', ' ']
- >>> f(' \t hello hello \t ')
- [' \t ', 'hello', ' ', 'hello', ' \t ']
- """
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.