Replace .next() calls with next() function

This commit is contained in:
Tyler Hobbs
2014-04-04 14:00:22 -05:00
parent 80dd5fe1cb
commit 0350498f00
3 changed files with 4 additions and 4 deletions

View File

@@ -355,7 +355,7 @@ class Connection(object):
locally_supported_compressions.keys(),
remote_supported_compressions)
else:
compression_type = iter(overlap).next() # choose any
compression_type = next(iter(overlap)) # choose any
# set the decompressor here, but set the compressor only after
# a successful Ready message
self._compressor, self.decompressor = \

View File

@@ -185,7 +185,7 @@ class _ReconnectionHandler(object):
try:
conn = self.try_reconnect()
except Exception as exc:
next_delay = self.schedule.next()
next_delay = next(self.schedule)
if self.on_exception(exc, next_delay):
self.scheduler.schedule(next_delay, self.run)
else:

View File

@@ -79,9 +79,9 @@ except ImportError:
if not self:
raise KeyError('dictionary is empty')
if last:
key = reversed(self).next()
key = next(reversed(self))
else:
key = iter(self).next()
key = next(iter(self))
value = self.pop(key)
return key, value