An oddity in list comparison and element assignment

michael.f.ellis at michael.f.ellis at
Thu Jun 1 23:57:49 CEST 2006

Truthfully, I wouldn't mind it at all.  In Python, I frequently write
things like
   i == int(f)
or vice versa just to avoid subtle bugs that sometimes creep in when
later modifications to code change the original assumptions.

When working in C, I always set the compiler for maximum warnings and
do my damndest to make them all go away. In the long run, time spent on
rigorous coding always repays itself with interest in time saved


Erik Max Francis wrote:
> michael.f.ellis at wrote:
> > With all due respect to your well-deserved standing in the Python
> > community, I'm not convinced that equality shouldn't imply invariance
> > under identical operations.
> Doo you really want
> 	2 == 2.0
> to be False?
> --
> Erik Max Francis && max at &&
> San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
>    Without victory there is no survival.
>    -- Winston Churchill

More information about the Python-list mailing list