Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!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: UNSURE 0.209 X-Spam-Level: ** X-Spam-Evidence: '*H*': 0.59; '*S*': 0.01; 'strings.': 0.07; 'creighton': 0.09; 'determining': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'wrote:': 0.16; 'laura': 0.18; '>>>': 0.20; 'am,': 0.23; 'examples': 0.24; 'header:In-Reply- To:1': 0.24; 'header:User-Agent:1': 0.26; 'mathematical': 0.27; 'correct': 0.28; 'decimal': 0.29; 'code': 0.30; 'possibly': 0.32; 'message-id:@gmail.com': 0.34; 'there': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'subject:with': 0.40; 'identify': 0.61; 'real': 0.62; 'telephone': 0.62; 'is.': 0.63; 'card': 0.63; 'personal': 0.63; 'world': 0.64; 'account': 0.66; 'biggest': 0.67; 'skip:\xe2 10': 0.70; '8bit%:43': 0.72; 'car': 0.72; 'plate': 0.84; 'subject:leading': 0.84; 'edwards': 0.91 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Wed, 22 Jul 2015 20:11:47 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Integers with leading zeroes References: <55ab37fb$0$1661$c3e8da3$5496439d@news.astraweb.com> <55aeea13$0$1669$c3e8da3$5496439d@news.astraweb.com> <55aefc70$0$1656$c3e8da3$5496439d@news.astraweb.com> <201507220712.t6M7CxJO014614@fido.openend.se> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 23 Jul 2015 09:27:00 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1437636423 news.xs4all.nl 2943 [2001:888:2000:d::a6]:49650 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:94431 On 07/22/2015 07:51 AM, Grant Edwards wrote: > On 2015-07-22, Ben Finney wrote: >> Laura Creighton writes: >> >>> The biggest use I have for decimal numbers that begin with 0 is in >>> credit card numbers, account numbers and the like where the first >>> check you do is 'does this thing have the correct number of digits'. >> >> The following are examples of types from the real world that people >> think of, and casually discuss, as “numbers”. >> >> * Postal code >> * Credit card number >> * Telephone number >> * Car registration plate number >> * Personal Identification Number (PIN) > > Those are all strings. Not numbers. That depends. A credit card number is indeed a number, and there are mathematical formulas for determining if a particular number is a valid (as in well-formed) credit card number, and possibly to identify what kind of card it is.