On 10Oct2013 15:50, Chris Angelico <ros...@gmail.com> wrote: > On Thu, Oct 10, 2013 at 3:36 PM, Steven D'Aprano <st...@pearwood.info> wrote: > > Just came across this little Javascript gem: > > > > ",,," == Array((null,'cool',false,NaN,4)); > > > > => evaluates as true > > > > http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array > > > > I swear, I am never going to complain about Python again. > > *blank look* > Wow. > > Now, is there a situation in which this problem can actually crop up > in production code?
Only, I think, the usual one: accidentally comparing two variables which should never have been compared, either by brain fade or typo. > And is it as serious as PHP's treatment of > hexadecimal hashes (eg that "100"== "1E2")? Charming. I don't even want to know :-( A friend forwarded me a link a few months ago; PHP apparently got some subclassing support that basicly seemed to support "mixins"; it looked ghastly. Cheers, -- Cameron Simpson <c...@zip.com.au> Strong typing isn't for weak minds; the argument 'strong typing is for weak minds' is for weak minds. - Guy Harris -- https://mail.python.org/mailman/listinfo/python-list