[Python-Dev] Re: PEP 285: Adding a bool type

Christian Tanzer tanzer at swing.co.at
Thu Apr 4 02:19:06 EST 2002


"Mark McEahern" <marklists at mceahern.com> wrote:

> [Christian Tanzer]
> >   For me, Python's (old) way of handling boolean conditions is one of
> >   its great strengths. This wasn't always the case. When I started
> >   using Python, I was slightly put off by the lack of a boolean data
> >   type. But quite quickly I learned to appreciate Python's way of
> >   dealing with this issue.
>
> How does the PEP change "Python's (old) way of handling boolean conditions"?
>
> Correct me if I'm wrong, but under the PEP, you can still do this:
>
> 	l = range(10)
> 	if l:
> 		print "My, the list is not empty!"
>
> So what's different?

Fortunately Guido closed the case before I got around to reading your
question <wink>.

Let's move on.

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92






More information about the Python-list mailing list