X Tutup
Skip to content

Commit 7064858

Browse files
committed
Revert "Use methods without iter"
This reverts commit 1ef719c.
1 parent 984422d commit 7064858

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

bpython/curtsiesfrontend/interpreter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class BPythonFormatter(Formatter):
4545

4646
def __init__(self, color_scheme, **options):
4747
self.f_strings = {}
48-
for k, v in color_scheme.items():
48+
for k, v in color_scheme.iteritems():
4949
self.f_strings[k] = '\x01%s' % (v,)
5050
Formatter.__init__(self, **options)
5151

bpython/formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class BPythonFormatter(Formatter):
8585

8686
def __init__(self, color_scheme, **options):
8787
self.f_strings = {}
88-
for k, v in theme_map.items():
88+
for k, v in theme_map.iteritems():
8989
self.f_strings[k] = '\x01%s' % (color_scheme[v],)
9090
if k is Parenthesis:
9191
# FIXME: Find a way to make this the inverse of the current

bpython/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ def tokenize(self, s, newline=False):
958958
else:
959959
stack.append((line, len(line_tokens) - 1,
960960
line_tokens, value))
961-
elif value in parens.values():
961+
elif value in parens.itervalues():
962962
saved_stack = list(stack)
963963
try:
964964
while True:

bpython/urwid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ def main(args=None, locals_=None, banner=None):
11511151
palette = [
11521152
(name, COLORMAP[color.lower()], 'default',
11531153
'bold' if color.isupper() else 'default')
1154-
for name, color in config.color_scheme.items()]
1154+
for name, color in config.color_scheme.iteritems()]
11551155
palette.extend([
11561156
('bold ' + name, color + ',bold', background, monochrome)
11571157
for name, color, background, monochrome in palette])

0 commit comments

Comments
 (0)
X Tutup