Hi,
is it proper to compare booleans? It is possible, of course, because
they're compatible with numbers, but booleans aren't truly numbers. I'm
tempted to write:
return cmp(self.extend s, other.extends)
instead of
if self.extends and not other.extends:
return 1
else:
return -1
# I've already verified self.extends != other.extends
....but somehow comparing Booleans doesn't feel right...
Is my feeling correct?
(Hmm, makes me wonder, for booleans, are != and ^ equal?)
Gerrit.
--
174. If she bear no sons to her second husband, the sons of her first
husband shall have the dowry.
-- 1780 BC, Hammurabi, Code of Law
--
PrePEP: Builtin path type
Asperger's Syndrome - a personal approach:
is it proper to compare booleans? It is possible, of course, because
they're compatible with numbers, but booleans aren't truly numbers. I'm
tempted to write:
return cmp(self.extend s, other.extends)
instead of
if self.extends and not other.extends:
return 1
else:
return -1
# I've already verified self.extends != other.extends
....but somehow comparing Booleans doesn't feel right...
Is my feeling correct?
(Hmm, makes me wonder, for booleans, are != and ^ equal?)
Gerrit.
--
174. If she bear no sons to her second husband, the sons of her first
husband shall have the dowry.
-- 1780 BC, Hammurabi, Code of Law
--
PrePEP: Builtin path type
Asperger's Syndrome - a personal approach:
Comment