PEP 285: Adding a bool type

Tim Peters tim.one at comcast.net
Sun Mar 31 14:17:20 EST 2002


[Aahz]
> But what do you think of changing bool() to truth()?

Whatever Guido tells me to think <wink>.  Before then, I think "bool"
usually reads better, as it's less a strain to use as either adjective or
noun.  Contrast, e.g.,

    isatty returns bool
    isatty returns a bool
    isatty returns a bool value

with

    isatty returns truth
    isatty returns a truth
    isatty returns a truth value

After reading "isatty returns a truth", I'm left wondering which specific
truth it returns, and whether I'd agree with it <wink>.

Strangely enough, even today:

>>> print os.isatty.__doc__
isatty(fd) -> Boolean
Return true if the file descriptor 'fd' is an open file descriptor
connected to the slave end of a terminal.
>>>

    isatty(fd) -> truth

doesn't read poorly, though.





More information about the Python-list mailing list