diff options
author | Raymond Hettinger <python@rcn.com> | 2015-08-18 05:04:45 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-08-18 05:04:45 (GMT) |
commit | 5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3 (patch) | |
tree | 4bb326ec6a4e0bdac1585d09db97611f905ee29a /Lib/sndhdr.py | |
parent | 02aa3426d393642999bb4f0e1a3125b9391ca399 (diff) | |
download | cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.zip cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.tar.gz cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.tar.bz2 |
Issue #24878: Add docstrings to selected namedtuples
Diffstat (limited to 'Lib/sndhdr.py')
-rw-r--r-- | Lib/sndhdr.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/sndhdr.py b/Lib/sndhdr.py index e5901ec..7ecafb4 100644 --- a/Lib/sndhdr.py +++ b/Lib/sndhdr.py @@ -37,6 +37,18 @@ from collections import namedtuple SndHeaders = namedtuple('SndHeaders', 'filetype framerate nchannels nframes sampwidth') +SndHeaders.filetype.__doc__ = ("""The value for type indicates the data type +and will be one of the strings 'aifc', 'aiff', 'au','hcom', +'sndr', 'sndt', 'voc', 'wav', '8svx', 'sb', 'ub', or 'ul'.""") +SndHeaders.framerate.__doc__ = ("""The sampling_rate will be either the actual +value or 0 if unknown or difficult to decode.""") +SndHeaders.nchannels.__doc__ = ("""The number of channels or 0 if it cannot be +determined or if the value is difficult to decode.""") +SndHeaders.nframes.__doc__ = ("""The value for frames will be either the number +of frames or -1.""") +SndHeaders.sampwidth.__doc__ = ("""Either the sample size in bits or +'A' for A-LAW or 'U' for u-LAW.""") + def what(filename): """Guess the type of a sound file.""" res = whathdr(filename) |