Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'mrab': 0.05; 'subject:Python': 0.06; 'string': 0.09; 'converted': 0.09; '"""if': 0.16; '-tkc': 0.16; 'coerced': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'number?': 0.16; 'string:': 0.16; 'uh,': 0.16; 'wrote:': 0.18; 'numerical': 0.19; 'looks': 0.24; 'compare': 0.26; 'header:In-Reply-To:1': 0.27; "i'm": 0.30; 'comparison': 0.31; 'this.': 0.32; 'skip:t 40': 0.33; 'but': 0.35; 'yours,': 0.36; 'charset:us-ascii': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'numbers': 0.61; 'skip:n 10': 0.64; 'forward.': 0.84; 'received:50.22': 0.84; 'right!': 0.84; 'url:php': 0.85 Date: Thu, 10 Oct 2013 06:43:16 -0500 From: Tim Chase To: python-list@python.org Subject: Re: I am never going to complain about Python again In-Reply-To: <52568B30.8040905@mrabarnett.plus.com> References: <52562ee3$0$2931$c3e8da3$76491128@news.astraweb.com> <52568B30.8040905@mrabarnett.plus.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: none 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1381405299 news.xs4all.nl 16003 [2001:888:2000:d::a6]:55338 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56560 On 2013-10-10 12:10, MRAB wrote: > Re "==", this page: > > http://php.net/manual/en/language.operators.comparison.php > > states: > > """If you compare a number with a string or the *comparison involves > numerical strings*, then each string is converted to a number and > the comparison performed numerically.""" (emphasis added) > > So they get coerced to numbers if they _look_ like numbers! BEDEVERE: How do you know she is a number? VILLAGER1: She looks like one! CROWD: Right! Yeah! Yeah! BEDEVERE: Bring her forward. STRING: I'm not a number. I'm not a number. BEDEVERE: Uh, but you are dressed as one. STRING: They dressed me up like this. Tenuously-trying-to-keep-python-related'ly yours, -tkc