Re: [Python-Dev] For review: PEP 285: Adding a bool type
8 Mar
2002
8 Mar
'02
8:14 a.m.
Do you propose to change the type of "x == y" et. al. from int --> bool?
Yup.
Sounds good to me.
I know. :-)
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.
Ick. Not that I run my doctests in -0 mode, though.
8090
Age (days ago)
8090
Last active (days ago)
0 comments
1 participants
participants (1)
-
David Abrahams