Changes between Initial Version and Version 4 of Ticket #540
- Timestamp:
- Jan 25, 2013, 12:15:42 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #540 – Description
initial v4 24 24 25 25 {{{ 26 #!py 26 27 #!/usr/bin/python 27 28 … … 29 30 import unittest 30 31 31 from tokenize import PseudoToken 32 from tokenize import ( 33 Whitespace, Number, Funny, ContStr, Name, Comment, Triple, group 34 ) 32 35 33 36 token_re = re.compile('%s|%s(?s)' % ( 34 37 r'[uU]?[rR]?("""|\'\'\')((?<!\\)\\\1|.)*?\1', 35 PseudoToken 36 )) 38 # PseudoToken = 39 Whitespace + group( 40 group( 41 # PseudoExtras = 42 # r'\\\r?\n', # with this (< 2.7.4) it works 43 r'\\\r?\n|\Z', # (>= 2.7.4) 44 Comment, Triple), 45 Number, Funny, ContStr, Name) 46 )) 37 47 38 48 class TestCase(unittest.TestCase): … … 42 52 if __name__ == '__main__': 43 53 unittest.main() 54 44 55 }}}