summaryrefslogtreecommitdiffstats
path: root/Lib/warnings.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-09-16 15:54:04 (GMT)
committerGeorg Brandl <georg@python.org>2009-09-16 15:54:04 (GMT)
commitfe99105835b59e66ca1fd53ea3f8bcec3ec7cb3c (patch)
tree5f0300442574c00e152284d0a223380f59dac6bf /Lib/warnings.py
parent3d6575dfc85cd11473aa93a8219ac010a823919a (diff)
downloadcpython-fe99105835b59e66ca1fd53ea3f8bcec3ec7cb3c.zip
cpython-fe99105835b59e66ca1fd53ea3f8bcec3ec7cb3c.tar.gz
cpython-fe99105835b59e66ca1fd53ea3f8bcec3ec7cb3c.tar.bz2
Use true booleans and PEP8 for argdefaults.
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r--Lib/warnings.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py
index b87d1be..5df3f49 100644
--- a/Lib/warnings.py
+++ b/Lib/warnings.py
@@ -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.