( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Mitchell Morris mgm at unpkhswm04.bscc.bls.com
Thu Jan 20 08:46:09 EST 2000


In article <Pine.SOL.3.91.1000120001532.29235B-100000 at sunse>,
Evguenii Smogailov wrote:
[snip]
>Yes, i'm saying that 'eq', 'ne' are more readable then '==' '!=', '<>',
>'next' shorter then 'continue' and '..' operator can be a good thing to 
>consider.
>
>evguenii

Except that Perl considers both '==' and 'eq' to be operators, and they
do different things.

% perl
print "cool\n" if 'A' eq 'B';
print "bzzzt\n" if 'A' == 'B';
__END__
bzzzt
% python
if "A" == "B": print "not on your life"
^D
% 

I guess we should be glad you didn't learn lisp first, because then you'd
be asking for 'eql', 'equal', and 'equals' as well as 'eq'.

+Mitchell

P.S. I'm not not not asking for references to your usability studies to
back up the claim that 'eq' is more readable (whatever that means) than
'=='. But I might, if pressed.


-- 
Mitchell Morris

Why is the symbol for anarchy always written the same way?



More information about the Python-list mailing list