Why does Python show the whole array?

Niklas Norrthon niklas.norrthon at hotmail.com
Thu Apr 9 04:16:31 EDT 2009


On 9 Apr, 09:49, Miles <semantic... at gmail.com> wrote:
> On Thu, Apr 9, 2009 at 2:59 AM, Peter Otten wrote:
> > Lawrence D'Oliveiro wrote:
> >> This is why conditional constructs should not accept any values other than
> >> True and False.
>
> > So you think
>
> > if test.find(item) == True: ...
>
> > would have been better?
>
> Clearly, any comparison with a boolean literal should be illegal.  ;)
>

So you think

truth_value = True
if test.find(item) == truth_value: ...

would have been better? :-)
(couldn't resist...)

/Niklas Norrthon




More information about the Python-list mailing list