- 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.
This commit is contained in:
Guido van Rossum 2003-04-19 18:15:10 +00:00
parent a26854095b
commit aa86e35c52
4 changed files with 18 additions and 2 deletions

View file

@ -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)