mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 01:44:48 -04:00
Move more xrange to six
plus a bonus next() Signed-off-by: Adrian Tschira <nota@notafile.com>
This commit is contained in:
parent
9558236728
commit
d82b6ea9e6
9 changed files with 28 additions and 11 deletions
|
@ -13,6 +13,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from six.moves import range
|
||||
|
||||
|
||||
class _Entry(object):
|
||||
__slots__ = ["end_key", "queue"]
|
||||
|
@ -68,7 +70,7 @@ class WheelTimer(object):
|
|||
# Add empty entries between the end of the current list and when we want
|
||||
# to insert. This ensures there are no gaps.
|
||||
self.entries.extend(
|
||||
_Entry(key) for key in xrange(last_key, then_key + 1)
|
||||
_Entry(key) for key in range(last_key, then_key + 1)
|
||||
)
|
||||
|
||||
self.entries[-1].queue.append(obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue