[Python-Dev] For review: PEP 285: Adding a bool type
Samuele Pedroni
pedroni@inf.ethz.ch
Sat, 9 Mar 2002 22:23:56 +0100
> Damn, you're right. I'll patch doctest to special-case the snot out of
> those specific strings <wink>. In the meantime,
>
> def ibool(e):
> return e and 1 or 0
> # or "return operator.truth(e)"
>
> will work across all Pythons forever, or back to 1.4 if you use
> operator.truth to avoid offending yourself <wink>.
>
And will improve doc tests doc readability <wink>.
sorry-I-couldn'-stop-myself-ly y'rs - Samuele.