Issue #8990: array.fromstring() and array.tostring() get renamed to
frombytes() and tobytes(), respectively, to avoid confusion. Furthermore,
array.frombytes(), array.extend() as well as the array.array()
constructor now accept bytearray objects. Patch by Thomas Jollans.
diff --git a/Lib/wave.py b/Lib/wave.py
index 950d8e2..57f9d17 100644
--- a/Lib/wave.py
+++ b/Lib/wave.py
@@ -248,7 +248,7 @@
chunk = chunk.file
chunk.size_read = chunk.size_read + nitems * self._sampwidth
data.byteswap()
- data = data.tostring()
+ data = data.tobytes()
else:
data = self._data_chunk.read(nframes * self._framesize)
if self._convert and data: