diff --git a/Lib/pdb.py b/Lib/pdb.py index 83884d7987f..dfa6fc8246e 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -23,7 +23,7 @@ __all__ = ["run", "pm", "Pdb", "runeval", "runctx", "runcall", "set_trace", "post_mortem", "help"] def find_function(funcname, filename): - cre = re.compile(r'def\s+%s\s*[(]' % funcname) + cre = re.compile(r'def\s+%s\s*[(]' % re.escape(funcname)) try: fp = open(filename) except IOError: