We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 590ff55 commit 547bd73Copy full SHA for 547bd73
1 file changed
bpython/inspection.py
@@ -24,6 +24,7 @@
24
from __future__ import with_statement
25
import collections
26
import inspect
27
+import keyword
28
import pydoc
29
import re
30
import sys
@@ -232,9 +233,11 @@ def getargspec(func, f):
232
233
234
def is_eval_safe_name(string):
235
if py3:
- return all(part.isidentifier() for part in string.split('.'))
236
+ return all(part.isidentifier() and not keyword.iskeyword(part)
237
+ for part in string.split('.'))
238
else:
- return all(_name.match(part) for part in string.split('.'))
239
+ return all(_name.match(part) and not keyword.iskeyword(part)
240
241
242
243
def is_callable(obj):
0 commit comments