Obsolesence of <> (fwd)
James Logajan
JamesL at Lugoj.Com
Fri Jun 1 14:06:49 EDT 2001
Alex Martelli wrote:
> The "pseudo-mathematical" ideas being those based on < and > which
> Lulu just proposed? Well then, if those ideas have any worth, then,
> GIVEN (as decided by the BDFL) that < and > don't apply, neither
> must <>. The only "justification" needed for != is: SOME inequality
> operator is needed, and it must definitely not be <>, which WRONGLY
> suggests analogies to < and >.
Shrug. You haven't made a specific case for "!=". I say that one may segue from
"<>" as applied to simple numbers, to application to sets of other things where
"<>"'s semantic historical origins aren't as valid. You seem to insist that any
hint of properties in the notation used for real numbers should not be used for
analogous operations on other sets or groups. I say that is contrary to how
mathematical and programming notation evolves to best suit programmers. Consider
for a moment multiplication. On real numbers the operation is commutative. On
matrices it is not. (And it is computationally more involved.) Yet the same
multiplication symbol or notation may be used in both cases. Even in Python a
symbol like "*" may be applied to a number and a string with a non obvious
meaning. But "+" may not be applied to a mix of strings and numbers. By the way,
do you object to "+" used for string concatenation? (This WRONGLY suggests an
analogy to numeric addition.) If not, why is it okay to take "+" or "*" and put
them to use for things that are not numbers, but it is not okay for "<>"?
I think you are biased and I'm afraid I'm going to have to report you to the
"Less Than or Greater Than Liberation Front". We at LTGTLF may just have to
introduce you to the COMFY CHAIR. Then maybe you will see reason!
> Besides, given the existence of "print >> blah", we're suffering
> from a serious surfeit of "order characters not meaning order"
> already:-). Let's abate it wherever we can...:-)
Hey, don't look at me. I'm still using 1.5.2. I have no idea what you are
talking about. ;-)
> "There should be one, and ideally only one, obviously correct way
> to do something". Having two entirely synonymous operators is
> unPythonic. It's an ideal, of course, not a practical reality --
> pow(x,y) vs x**y, apply(spam,args) vs spam(*args), etc, shows that
> multiple ways to "do something" can and will survive in Python
> (particularly for legacy/historical reasons). It's still a worthy
> ideal to aim at, in my humble opinion.
Then we are agreed that "!=" should be obsolete? Whew! glad that is settled.
More information about the Python-list
mailing list