[Python-checkins] r72123 - in python/branches/py3k: Doc/library/aifc.rst Lib/test/test_aifc.py

r.david.murray python-checkins at python.org
Wed Apr 29 23:50:39 CEST 2009


Author: r.david.murray
Date: Wed Apr 29 23:50:39 2009
New Revision: 72123

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


Modified:
   python/branches/py3k/Doc/library/aifc.rst
   python/branches/py3k/Lib/test/test_aifc.py

Modified: python/branches/py3k/Doc/library/aifc.rst
==============================================================================
--- python/branches/py3k/Doc/library/aifc.rst	(original)
+++ python/branches/py3k/Doc/library/aifc.rst	Wed Apr 29 23:50:39 2009
@@ -74,14 +74,16 @@
 
 .. 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 @@
       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)

Modified: python/branches/py3k/Lib/test/test_aifc.py
==============================================================================
--- python/branches/py3k/Lib/test/test_aifc.py	(original)
+++ python/branches/py3k/Lib/test/test_aifc.py	Wed Apr 29 23:50:39 2009
@@ -35,8 +35,6 @@
         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(


More information about the Python-checkins mailing list