mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
Move brief descriptions of what() and whathdr() to docstrings in the
functions (from comments).
This commit is contained in:
parent
9ddaaa1a30
commit
dc1aedfe2e
1 changed files with 2 additions and 8 deletions
|
@ -31,20 +31,14 @@ explicitly given directories.
|
||||||
# subroutine come last.
|
# subroutine come last.
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------#
|
|
||||||
# Guess the type of a sound file #
|
|
||||||
#--------------------------------#
|
|
||||||
|
|
||||||
def what(filename):
|
def what(filename):
|
||||||
|
"""Guess the type of a sound file"""
|
||||||
res = whathdr(filename)
|
res = whathdr(filename)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
#-------------------------#
|
|
||||||
# Recognize sound headers #
|
|
||||||
#-------------------------#
|
|
||||||
|
|
||||||
def whathdr(filename):
|
def whathdr(filename):
|
||||||
|
"""Recognize sound headers"""
|
||||||
f = open(filename, 'r')
|
f = open(filename, 'r')
|
||||||
h = f.read(512)
|
h = f.read(512)
|
||||||
for tf in tests:
|
for tf in tests:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue