diff options
author | R. David Murray <rdmurray@bitdance.com> | 2009-04-29 21:50:39 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2009-04-29 21:50:39 (GMT) |
commit | e08a66a37140faef88bc992cd5d1d2e8982e8012 (patch) | |
tree | 4a5cc16c9b4e4f7b58f18c37372d34362da5a26e | |
parent | a3b0d20a798b6149f7152fec956b4ed648be5b1c (diff) | |
download | cpython-e08a66a37140faef88bc992cd5d1d2e8982e8012.zip cpython-e08a66a37140faef88bc992cd5d1d2e8982e8012.tar.gz cpython-e08a66a37140faef88bc992cd5d1d2e8982e8012.tar.bz2 |
Document the fact that 'compname' and 'comptype' are bytes.
-rw-r--r-- | Doc/library/aifc.rst | 21 | ||||
-rw-r--r-- | Lib/test/test_aifc.py | 2 |
2 files changed, 12 insertions, 11 deletions
diff --git a/Doc/library/aifc.rst b/Doc/library/aifc.rst index 710b14d..59837ce 100644 --- a/Doc/library/aifc.rst +++ b/Doc/library/aifc.rst @@ -74,14 +74,16 @@ following methods: .. method:: aifc.getcomptype() - Return a four-character string describing the type of compression used in the - audio file. For AIFF files, the returned value is ``'NONE'``. + Return a bytes array of length 4 describing the type of compression + used in the audio file. For AIFF files, the returned value is + ``b'NONE'``. .. method:: aifc.getcompname() - Return a human-readable description of the type of compression used in the audio - file. For AIFF files, the returned value is ``'not compressed'``. + Return a bytes array convertible to a human-readable description + of the type of compression used in the audio file. For AIFF files, + the returned value is ``b'not compressed'``. .. method:: aifc.getparams() @@ -180,11 +182,12 @@ number of frames must be filled in. single: A-LAW single: G.722 - Specify the compression type. If not specified, the audio data will not be - compressed. In AIFF files, compression is not possible. The name parameter - should be a human-readable description of the compression type, the type - parameter should be a four-character string. Currently the following - compression types are supported: NONE, ULAW, ALAW, G722. + Specify the compression type. If not specified, the audio data will + not be compressed. In AIFF files, compression is not possible. + The name parameter should be a human-readable description of the + compression type as a bytes array, the type parameter should be a + bytes array of length 4. Currently the following compression types + are supported: ``b'NONE'``, ``b'ULAW'``, ``b'ALAW'``, ``b'G722'``. .. method:: aifc.setparams(nchannels, sampwidth, framerate, comptype, compname) diff --git a/Lib/test/test_aifc.py b/Lib/test/test_aifc.py index e97647c..1e84bd6 100644 --- a/Lib/test/test_aifc.py +++ b/Lib/test/test_aifc.py @@ -35,8 +35,6 @@ class AIFCTest(unittest.TestCase): self.assertEqual(f.getsampwidth(), 2) self.assertEqual(f.getframerate(), 48000) self.assertEqual(f.getnframes(), 14400) - # XXX: are the next two correct? The docs say/imply they are supposed - # to be strings. self.assertEqual(f.getcomptype(), b'NONE') self.assertEqual(f.getcompname(), b'not compressed') self.assertEqual( |