[Python-Dev] For review: PEP 285: Adding a bool type (original) (raw)
Guido van Rossum guido@python.org
Fri, 08 Mar 2002 10:57:22 -0500
- Previous message: [Python-Dev] For review: PEP 285: Adding a bool type
- Next message: [Python-Dev] For review: PEP 285: Adding a bool type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Do you propose to change the type of "x == y" et. al. from int --> bool? Sounds good to me.
Yes.
In general, I can change my doctests to use assert rather than looking for 1 or 0.
Hm, assert is the wrong thing though, since it's optimized away in -O mode. You may have to create your own function "check(x)" that does nothing on true but raises an exception on false, or prints "Yes" or "No", or something like that.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] For review: PEP 285: Adding a bool type
- Next message: [Python-Dev] For review: PEP 285: Adding a bool type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]