PEP 285: Adding a bool type

Joshua Macy l0819m0v0smfm001 at sneakemail.com
Sat Apr 6 13:29:16 EST 2002


Laura Creighton wrote:

> Note:  don't tell me that because python bools are just ints, it
>        doesn't matter -- people who were using bools for
>        DEMOCRAT and REPUBLICAN can now add 
>        THE_DAMN_VOTE_WASNT_PUNCHED_THROUGH - (the integer 3)
>        when to their horror they discover 2 values was not enough.
>        I need to teach students to not use bools in languages which
>        are not so forgiving.
> 


   Python's a terrible language to try to teach students how to use less 
  forgiving languages.  So what?  Should Python add type declarations 
and compile-time type checking so that it's easier to use Python to 
teach students not to do things that would get them in trouble in Java?

   Personally, I think PEP 285 does the right thing *for Python*, given 
its history, and absolutely do not care whether it might give someone 
the wrong idea about how some other hypothetical language works.  (Hey, 
at least your students will be ready for C99, which has the same notion 
of bool, so it's not a dead loss. <wink>)


   Joshua






More information about the Python-list mailing list