[Python-Dev] For review: PEP 285: Adding a bool type (original) (raw)
Samuele Pedroni pedroni@inf.ethz.ch
Sat, 9 Mar 2002 22:45:57 +0100
- Previous message: [Python-Dev] Yet another (?) for-with-indices
- Next message: [Python-Dev] For review: PEP 285: Adding a bool type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Damn, you're right. I'll patch doctest to special-case the snot out of > those specific strings . 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 .
Btw given that probably operator.truth() will become a synonym of bool() the "# or" comment does not apply.
Tim, should we start to be worried about the problems you have to get those things right or are you just in very-low-concetration mode?
regards, Samuele Pedroni.
- Previous message: [Python-Dev] Yet another (?) for-with-indices
- Next message: [Python-Dev] For review: PEP 285: Adding a bool type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]