summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bool.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-04-19 18:15:10 (GMT)
committerGuido van Rossum <guido@python.org>2003-04-19 18:15:10 (GMT)
commitaa86e35c524275e1f6cca91c1f8fcfc15e8d8b30 (patch)
tree09a2231543fb1f83d759ee5bfa41bca0a88d500a /Lib/test/test_bool.py
parenta26854095be67418bc89eff4874b32e33d7e5bf6 (diff)
downloadcpython-aa86e35c524275e1f6cca91c1f8fcfc15e8d8b30.zip
cpython-aa86e35c524275e1f6cca91c1f8fcfc15e8d8b30.tar.gz
cpython-aa86e35c524275e1f6cca91c1f8fcfc15e8d8b30.tar.bz2
- bool() called without arguments now returns False rather than
raising an exception. This is consistent with calling the constructors for the other builtin types -- called without argument they all return the false value of that type. (SF patch #724135) Thanks to Alex Martelli.
Diffstat (limited to 'Lib/test/test_bool.py')
-rw-r--r--Lib/test/test_bool.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py
index 404b4e8..a0a03ee 100644
--- a/Lib/test/test_bool.py
+++ b/Lib/test/test_bool.py
@@ -137,6 +137,7 @@ veris(bool(-1), True)
veris(bool(0), False)
veris(bool("hello"), True)
veris(bool(""), False)
+veris(bool(), False)
veris(hasattr([], "append"), True)
veris(hasattr([], "wobble"), False)