[Python-checkins] cpython: Updated usage of boolean values.

vinay.sajip python-checkins at python.org
Sat Apr 30 22:52:59 CEST 2011


http://hg.python.org/cpython/rev/9078fcce6982
changeset: 69721:9078fcce6982
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Sat Apr 30 21:51:51 2011 +0100
summary:
 Updated usage of boolean values.
files:
 Lib/logging/__init__.py | 10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -688,14 +688,14 @@
 
 Allow filters to be just callables.
 """
- rv = 1
+ rv = True
 for f in self.filters:
 if hasattr(f, 'filter'):
 result = f.filter(record)
 else:
 result = f(record) # assume callable - will raise if not
 if not result:
- rv = 0
+ rv = False
 break
 return rv
 
@@ -1197,9 +1197,9 @@
 self.name = name
 self.level = _checkLevel(level)
 self.parent = None
- self.propagate = 1
+ self.propagate = True
 self.handlers = []
- self.disabled = 0
+ self.disabled = False
 
 def setLevel(self, level):
 """
@@ -1567,7 +1567,7 @@
 """
 Delegate an exception call to the underlying logger.
 """
- kwargs["exc_info"] = 1
+ kwargs["exc_info"] = True
 self.log(ERROR, msg, *args, **kwargs)
 
 def critical(self, msg, *args, **kwargs):
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /