Use true booleans and PEP8 for argdefaults.

This commit is contained in:
Georg Brandl 2009-09-16 15:54:04 +00:00
parent 3d6575dfc8
commit fe99105835
9 changed files with 21 additions and 21 deletions

View file

@ -29,7 +29,7 @@ def formatwarning(message, category, filename, lineno, line=None):
return s
def filterwarnings(action, message="", category=Warning, module="", lineno=0,
append=0):
append=False):
"""Insert an entry into the list of warnings filters (at the front).
Use assertions to check that all arguments have the right type."""
@ -49,7 +49,7 @@ def filterwarnings(action, message="", category=Warning, module="", lineno=0,
else:
filters.insert(0, item)
def simplefilter(action, category=Warning, lineno=0, append=0):
def simplefilter(action, category=Warning, lineno=0, append=False):
"""Insert a simple entry into the list of warnings filters (at the front).
A simple filter matches all modules and messages.