PEP 285: Adding a bool type

John Roth johnroth at ameritech.net
Sat Apr 6 10:14:28 EST 2002


"Alex Martelli" <aleax at aleax.it> wrote in message
news:gJDq8.55255$S52.1904212 at news2.tin.it...
> John Roth wrote:
>         ...
> > Maybe my post in response didn't propagate? As I said in that
> > post, the root of her problem is a poorly chosen name for the
> > function. If she paid attention to constructing the name properly,
>
> She adopted the name *Guido* had given to the function right in
> his pep (actually clarifying it a bit from 'isleap' in his PEP
> to 'isLeapYear', more readable, in her post).

Sorry I'm late in responding to both posts - I had a problem
with my newsgroup vendor and I'm just back on.

I thought the original example was very bad, but I didn't
say so at the time because I hadn't figured out what I didn't
like about it.

The original example was something like

number of days in year = 365 + isLeap(year).

To put it bluntly, that's a very confusing hack that depends
on conceptual True being 1 and conceptual False being
zero.

Again, to put it very bluntly, Laura swallowed a camel
while straining at a gnat. She had a great deal to say about
the difficulty of teaching that example, and I agree completely.
It would be very difficult to teach, but the reason is that
the name is simply wrong. The fact that Guido himself
used that as an example doesn't make it right, either.

If she had corrected the name, then her entire basis for
the objection would have evaporated.

John Roth
>
>
> Alex
>





More information about the Python-list mailing list