Skip to content

Commit

Permalink
izip
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimas committed Jan 15, 2025
1 parent 09fa1f8 commit 38515c9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions open_dubbing/pydub_audio_segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@
except ImportError:
import pyaudioop as audioop


try:
from itertools import izip
except:
izip = zip


if sys.version_info >= (3, 0):
basestring = str
xrange = range
Expand Down Expand Up @@ -560,7 +553,7 @@ def __init__(self, data=None, *args, **kwargs):
# implemented.
i = iter(self._data)
padding = {False: b"\x00", True: b"\xFF"}
for b0, b1, b2 in izip(i, i, i):
for b0, b1, b2 in zip(i, i, i):
byte_buffer.write(padding[b2 > b"\x7f"[0]])
old_bytes = struct.pack(pack_fmt, b0, b1, b2)
byte_buffer.write(old_bytes)
Expand Down

0 comments on commit 38515c9

Please sign in to comment.