Skip to content

Commit 12b3d33

Browse files
committed
Merge.
2 parents c6d4086 + 547bd73 commit 12b3d33

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

bpython/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ def reevaluate(self):
10471047
self.iy, self.ix = self.scr.getyx()
10481048

10491049
self.cpos = 0
1050-
indent = next_indentation(self.s, self.config.tab_length)
1050+
indent = repl.next_indentation(self.s, self.config.tab_length)
10511051
self.s = ''
10521052
self.scr.refresh()
10531053

bpython/inspection.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from __future__ import with_statement
2525
import collections
2626
import inspect
27+
import keyword
2728
import pydoc
2829
import re
2930
import sys
@@ -232,9 +233,11 @@ def getargspec(func, f):
232233

233234
def is_eval_safe_name(string):
234235
if py3:
235-
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('.'))
236238
else:
237-
return all(_name.match(part) for part in string.split('.'))
239+
return all(_name.match(part) and not keyword.iskeyword(part)
240+
for part in string.split('.'))
238241

239242

240243
def is_callable(obj):

0 commit comments

Comments
 (0)