[Python-Dev] Re: PEP 285: Adding a bool type (original) (raw)
Barry A. Warsaw barry@zope.com
Wed, 3 Apr 2002 15:05:13 -0500
- Previous message: [Python-Dev] Re: PEP 285: Adding a bool type
- Next message: [Python-Dev] Re: PEP 285: Adding a bool type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"KY" == Ka-Ping Yee <ping@lfw.org> writes:
KY> This doesn't mean anything in practice. Every yes/no function
KY> i've encountered returns 1 for yes and 0 for no.
Now we see a way out. Rename the constants to Yes and No and add a builtin alias for bool() calld theAnswerTo(). Thus all our conditionals would be written like so:
if theAnswerTo(myQuestion) is Yes:
# do it
truthful-ly y'rs, -Barry
- Previous message: [Python-Dev] Re: PEP 285: Adding a bool type
- Next message: [Python-Dev] Re: PEP 285: Adding a bool type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]