mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
Avoid python version check and use from six.moves import zip
This commit is contained in:
parent
fa77a49349
commit
d3eca27140
1 changed files with 3 additions and 8 deletions
|
|
@ -9,7 +9,6 @@ import sys
|
|||
|
||||
import json
|
||||
import logging
|
||||
import itertools
|
||||
import contextlib
|
||||
from collections import OrderedDict, defaultdict
|
||||
from math import ceil
|
||||
|
|
@ -130,14 +129,10 @@ def float_round(num, places=0, direction=ceil):
|
|||
|
||||
def pairwise(iterable):
|
||||
"""s -> (s0,s1), (s2,s3), (s4, s5), ..."""
|
||||
from six.moves import zip
|
||||
|
||||
a = iter(iterable)
|
||||
|
||||
if sys.version_info[0] == 2:
|
||||
izip = itertools.izip
|
||||
else:
|
||||
izip = zip
|
||||
|
||||
return izip(a, a)
|
||||
return zip(a, a)
|
||||
|
||||
|
||||
def unique(name):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue