mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
Convert a pile of obvious "yes/no" functions to return bool.
This commit is contained in:
parent
2f486b7fa6
commit
bc0e910826
34 changed files with 117 additions and 122 deletions
|
@ -148,7 +148,8 @@ def ispackage(path):
|
|||
if os.path.isdir(path):
|
||||
for ext in ['.py', '.pyc', '.pyo']:
|
||||
if os.path.isfile(os.path.join(path, '__init__' + ext)):
|
||||
return 1
|
||||
return True
|
||||
return False
|
||||
|
||||
def synopsis(filename, cache={}):
|
||||
"""Get the one-line summary out of a module file."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue