Message224848
Example:
>>> completer = rlcompleter.Completer()
>>> class A(object):
... def foo(): pass
... def foobar(): pass
>>> completer.complete("A.foo(", 0)
'A.foo('
>>> completer.complete("A.foo(", 1)
'A.foobar('
I consider the last match a bug.
The root of this bug is that in attr_matches the regular expression ignores any trailing non-alphanumeric characters by using the "\w" sequence. Note that it would also match "A.foo?%&@" to both "A.foo" and "A.foobar".
I propose this regex instead:
r"(\w+(\.\w+)*)\.([^.]*)"
What do people think? |
|
Date |
User |
Action |
Args |
2014-08-05 15:59:59 | donlorenzo | set | recipients:
+ donlorenzo |
2014-08-05 15:59:59 | donlorenzo | set | messageid: <1407254399.39.0.799670201718.issue22141@psf.upfronthosting.co.za> |
2014-08-05 15:59:59 | donlorenzo | link | issue22141 messages |
2014-08-05 15:59:59 | donlorenzo | create | |
|