]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 72123 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Wed, 29 Apr 2009 21:52:37 +0000 (21:52 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Wed, 29 Apr 2009 21:52:37 +0000 (21:52 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r72123 | r.david.murray | 2009-04-29 17:50:39 -0400 (Wed, 29 Apr 2009) | 2 lines

  Document the fact that 'compname' and 'comptype' are bytes.
........

Doc/library/aifc.rst
Lib/test/test_aifc.py

index e3bb51a65c7b363c9d3582d4859859152a1b59e0..49f15b7f69c0d23a75674d4f729fcb0c80aca2f2 100644 (file)
@@ -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)
index fd411262207cf9ddb620607c8d0f0cc0bce12ffe..a9c53a3610102542131c51835e029540918f77b4 100644 (file)
@@ -21,8 +21,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(