Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Integers with leading zeroes Date: Fri, 24 Jul 2015 18:23:09 +1200 Lines: 18 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 5QVmGQyIufPvu6mFgUNBqwFgjL9Pb9rTeabkypRtlUZO2BnDLJ Cancel-Lock: sha1:/bnLsD8YFffLCX8LjQhChacFd1o= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:94492 Michael Torrie wrote: > 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, If you're talking about the check-digit algorithm, that doesn't treat the whole number as an integer, it works on the individual digits: http://www.datagenetics.com/blog/july42013/ > and possibly to identify what kind of card it is. That's determined by the leading digits, and can be done just as well by treating them as characters. -- Greg