Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'argument': 0.05; 'subject:Python': 0.06; 'only,': 0.07; 'think,': 0.07; 'variables': 0.07; 'seemed': 0.09; 'python': 0.11; ':-(': 0.16; 'code?': 0.16; 'crop': 0.16; 'evaluates': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'hashes': 0.16; 'hexadecimal': 0.16; 'message- id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'simpson': 0.16; 'subclassing': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'thu,': 0.19; 'typing': 0.19; 'header:User-Agent:1': 0.23; 'comparing': 0.24; 'url:02': 0.24; 'cheers,': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'accidentally': 0.31; 'apparently': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'problem': 0.35; 'usual': 0.35; 'there': 0.35; 'received:com.au': 0.36; 'charset:us-ascii': 0.36; 'should': 0.36; 'two': 0.37; 'received:211': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'forwarded': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'even': 0.60; 'guy': 0.60; 'skip:a 30': 0.61; 'content-disposition:inline': 0.62; 'situation': 0.65; 'production': 0.68; 'brain': 0.68; 'url:11': 0.68; 'url:2011': 0.75; 'friend': 0.79; 'treatment': 0.95; 'serious': 0.97; '2013': 0.98 Date: Thu, 10 Oct 2013 16:30:58 +1100 From: Cameron Simpson To: python-list@python.org Subject: Re: I am never going to complain about Python again MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) References: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=YYGEuWhf c=1 sm=1 tr=0 a=YuQlxtEQCowy2cfE5kc7TA==:117 a=YuQlxtEQCowy2cfE5kc7TA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=LcaDllckn3IA:10 a=9Lj92nWf6HwA:10 a=kj9zAlcOel0A:10 a=vrnE16BAAAAA:8 a=8AHkEIZyAAAA:8 a=_Q_BDBVkwOwA:10 a=pGLkceISAAAA:8 a=kZ7UWmmPAAAA:8 a=jXVu7m8nAAAA:8 a=lzjDXzLKlJwUHF6n5gAA:9 a=CjuIK1q_8ugA:10 a=MSl-tDqOz04A:10 a=pyH5b1fOeEsA:10 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1381384590 news.xs4all.nl 15922 [2001:888:2000:d::a6]:35159 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56543 On 10Oct2013 15:50, Chris Angelico wrote: > On Thu, Oct 10, 2013 at 3:36 PM, Steven D'Aprano 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 Strong typing isn't for weak minds; the argument 'strong typing is for weak minds' is for weak minds. - Guy Harris