diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-09-03 21:28:43 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-09-03 21:28:43 (GMT) |
commit | 4c6a020a2d1a6d2bee1bbe4e426cbc8f7ca2cf9a (patch) | |
tree | f4367eaa39d6987ba720e25143b057649e5953c0 /Lib/wave.py | |
parent | c6171e49ab2aee5807bcb6c0f77d0de13a164a99 (diff) | |
download | cpython-4c6a020a2d1a6d2bee1bbe4e426cbc8f7ca2cf9a.zip cpython-4c6a020a2d1a6d2bee1bbe4e426cbc8f7ca2cf9a.tar.gz cpython-4c6a020a2d1a6d2bee1bbe4e426cbc8f7ca2cf9a.tar.bz2 |
Issue #17487: The result of the wave getparams method now is pickleable again.
Patch by Claudiu Popa.
Diffstat (limited to 'Lib/wave.py')
-rw-r--r-- | Lib/wave.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/wave.py b/Lib/wave.py index f43569e..1c6380e 100644 --- a/Lib/wave.py +++ b/Lib/wave.py @@ -87,7 +87,7 @@ import sys from chunk import Chunk from collections import namedtuple -_result = namedtuple('params', +_wave_params = namedtuple('_wave_params', 'nchannels sampwidth framerate nframes comptype compname') class Wave_read: @@ -212,7 +212,7 @@ class Wave_read: return self._compname def getparams(self): - return _result(self.getnchannels(), self.getsampwidth(), + return _wave_params(self.getnchannels(), self.getsampwidth(), self.getframerate(), self.getnframes(), self.getcomptype(), self.getcompname()) @@ -410,7 +410,7 @@ class Wave_write: def getparams(self): if not self._nchannels or not self._sampwidth or not self._framerate: raise Error('not all parameters set') - return _result(self._nchannels, self._sampwidth, self._framerate, + return _wave_params(self._nchannels, self._sampwidth, self._framerate, self._nframes, self._comptype, self._compname) def setmark(self, id, pos, name): |