Skip to content

Commit

Permalink
Fix py2.6 compat issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Adler committed Oct 25, 2018
1 parent 0bb7b07 commit dadf17b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/future/backports/misc.py
Expand Up @@ -817,7 +817,7 @@ def __delitem__(self, key):
try:
del self.maps[0][key]
except KeyError:
raise KeyError('Key not found in the first mapping: {!r}'.format(key))
raise KeyError('Key not found in the first mapping: {0!r}'.format(key))

def popitem(self):
'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.'
Expand All @@ -831,7 +831,7 @@ def pop(self, key, *args):
try:
return self.maps[0].pop(key, *args)
except KeyError:
raise KeyError('Key not found in the first mapping: {!r}'.format(key))
raise KeyError('Key not found in the first mapping: {0!r}'.format(key))

def clear(self):
'Clear maps[0], leaving maps[1:] intact.'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_future/test_futurize.py
Expand Up @@ -1194,7 +1194,7 @@ def total_count(self):
x = 3 / 2
y = 3. / 2
foo = range(100)
foo = list(range(100))
assert x == 1 and isinstance(x, int)
assert y == 1.5 and isinstance(y, float)
a = 1 + foo[len(foo) / 2]
Expand Down

0 comments on commit dadf17b

Please sign in to comment.