PEP 285: Adding a bool type

John Roth johnroth at ameritech.net
Tue Apr 2 21:21:27 EST 2002


"Laura Creighton" <lac at strakt.com> wrote in message
news:mailman.1017755045.4308.python-list at python.org...
> Dear Guido:
>
> I would first like to thank you for giving us an opportunity to
respond.
> I have spent most of the weekend thinking and writing a reply to this,
> and I think that this has made me a better teacher.  For this I am
> grateful.  I realise that this is rather long, but I have condensed
> it substantially from my efforts earlier this weekend.   Thank you
> for taking the time to read this.
>
> Laura Creighton
>
> -----------------------------
>
I'm not going to quote this, as it's already too long. I read up to
the diatribe on the Swedish leap year, and I went AAAARRRRGGGH!

I really don't care if you want the silly function to return
a Boolean, the number of leap days in the year, or the name
of the idiot parliamentarian who decided to fix the calendar
so that 1712 was different from the rest of Europe.

HOWEVER, if you want true or false as the return
value, the name should be something like 'isLeapYear()'.
If you want the number of leap days in the year, then
it should be named something like 'numberOfLeapDays().'

Sorry to make this sound like a flame, but I try to
practice XP. The first time I ever come across a
function named "isSomething" that returns a conceptual
integer, it's going to get refactored, right then and
there to a name that actually expresses what it does.

John Roth





More information about the Python-list mailing list