integer >= 1 == True and integer.0 == False is bad, bad, bad!!!

rantingrick rantingrick at gmail.com
Sun Jul 11 20:51:04 EDT 2010


On Jul 11, 7:23 pm, Steven D'Aprano <st... at REMOVE-THIS-
cybersource.com.au> wrote:
> On Sun, 11 Jul 2010 16:22:41 -0700, rantingrick wrote:
> > On Jul 11, 1:19 pm, Mark Dickinson <dicki... at gmail.com> wrote:
>
> >> Okay.  What fix do you propose?  Would your fix maintain the identity
> >> "0 == False"?
>
> > No because all integers should bool True. An integer is a value that IS
> > NOT empty
>
> Integers aren't containers, the concept of "empty" or "full" doesn't
> apply to them.

And again you failed to follow along with the thread so you have no
idea where my statements is projected from. Of course integers are NOT
containers in the way a list or dict is a container! My remark was a
rebuff of comments made by Stephen earlier.

> > and IS NOT None.
>
> By this definition, the string "rantingrick hasn't thought this through"
> is an integer. It's not empty, and not None, so therefore an integer by
> your definition.

Again you show lack of reading and comprehension skills. The fact that
an integer IS NOT None does not mean this is the only definition of an
integer. And any blabbing otherwise is just complete nonsensical crap.
If you think you're going to fly in here and dis-credit me that easily
you'd better pack a lunch next time! I gots my think'in cap on today
fella!

> > We would't deal with backwards compatibility as this notion of bool(1)
> > == True and bool(0) == False if backwards way of thinking. Sure it saves
> > a few keystrokes but in the end only serves to obfuscate the code and
> > promote bad programming styles. WE SHOULD NEVER BE USING 1 IN PLACE OF
> > True AND 0 IN PLACE OF False!
>
> Nevertheless, what is done is done, and now you have to deal with it.
> Just wishing that it was never done is not dealing with backwards
> compatibility, and breaking existing code is not an acceptable option.

Yea and if Guido would have taking your defeatist attitude we'd all be
using braces for scope!

You know D'Aprano, i had once considered you one of the foremost
intelligent minds within this group. However, after your display
within this thread i am beginning to doubt my original beliefs of you.
Hopefully you're just having an "off" day?



More information about the Python-list mailing list