Show More
@@ -506,7 +506,8 b' class InputSplitter(object):' | |||
|
506 | 506 | line_split = re.compile(""" |
|
507 | 507 | ^(\s*) # any leading space |
|
508 | 508 | ([,;/%]|!!?|\?\??) # escape character or characters |
|
509 |
\s*([\w\.]*) |
|
|
509 | \s*(%?[\w\.]*) # function/method, possibly with leading % | |
|
510 | # to correctly treat things like '?%magic' | |
|
510 | 511 | (\s+.*$|$) # rest of line |
|
511 | 512 | """, re.VERBOSE) |
|
512 | 513 | |
@@ -551,6 +552,8 b' def split_user_input(line):' | |||
|
551 | 552 | ('', '', 'f.g(x)', '') |
|
552 | 553 | >>> split_user_input('f.g (x)') |
|
553 | 554 | ('', '', 'f.g', '(x)') |
|
555 | >>> split_user_input('?%hist') | |
|
556 | ('', '?', '%hist', '') | |
|
554 | 557 | """ |
|
555 | 558 | match = line_split.match(line) |
|
556 | 559 | if match: |
General Comments 0
You need to be logged in to leave comments.
Login now