Skip to content

Commit 337752b

Browse files
committed
Remove Python 2 compatibility with "basestring"
1 parent 40e6380 commit 337752b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

sounddevice.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@
9494
_initialized = 0
9595
_last_callback = None
9696

97-
try:
98-
_basestring = basestring
99-
except NameError:
100-
_basestring = str, bytes
101-
10297

10398
def play(data, samplerate=None, mapping=None, blocking=False, loop=False,
10499
**kwargs):
@@ -2708,7 +2703,7 @@ def _split(value):
27082703
for input and output but also a pair of two separate values.
27092704
27102705
"""
2711-
if isinstance(value, _basestring):
2706+
if isinstance(value, (str, bytes)):
27122707
# iterable, but not meant for splitting
27132708
return value, value
27142709
try:

0 commit comments

Comments
 (0)