Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed7.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'strings.': 0.07; 'creighton': 0.09; 'stored': 0.10; 'wed,': 0.15; '11:09': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'integers.': 0.16; 'left,': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:192.168.1.4': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'wrote:': 0.16; 'string': 0.17; 'basically': 0.18; 'laura': 0.18; '>>>': 0.20; 'versions': 0.20; '2015': 0.20; 'mind.': 0.22; 'tkinter': 0.22; 'am,': 0.23; 'performing': 0.23; 'examples': 0.24; 'header:In-Reply-To:1': 0.24; 'sort': 0.25; "i've": 0.25; 'header:User-Agent:1': 0.26; '+0200,': 0.27; 'format,': 0.27; 'specify': 0.27; 'correct': 0.28; 'decimal': 0.29; 'far,': 0.29; 'code': 0.30; 'operations': 0.31; 'received:84': 0.32; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'stuff': 0.38; 'does': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'subject:with': 0.40; 'yes': 0.62; 'card': 0.63; 'information': 0.63; 'account': 0.66; 'biggest': 0.67; 'jul': 0.72; 'maths': 0.84; 'pardon': 0.84; 'subject:leading': 0.84 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=OoyysHLt c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=EBOSESyhAAAA:8 a=JAI3OqB5mnwA:10 a=IkcTkHD0fZMA:10 a=JpYY5NWB4kMAhGtdUbcA:9 a=2ixn01YAS3r3ZIlO:21 a=QdQ6_Vxe_cxr5KzN:21 a=QEXdDO2ut3YA:10 X-AUTH: mrabarnett@:2500 Subject: Re: Integers with leading zeroes To: python-list@python.org 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> <55AFB673.4040100@rece.vub.ac.be> From: MRAB Date: Wed, 22 Jul 2015 16:38:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55AFB673.4040100@rece.vub.ac.be> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1437579516 news.xs4all.nl 2955 [2001:888:2000:d::a6]:35734 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:94375 On 2015-07-22 16:27, Antoon Pardon wrote: > On 07/22/2015 11:09 AM, alister wrote: >> On Wed, 22 Jul 2015 09:12:59 +0200, Laura Creighton wrote: >> >>> 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'. >>> So far, all the examples I've been able to find in my code -- which does >>> this sort of stuff a lot -- is looking at string versions of decimal >>> numbers, but I suspect there is old code out there in the wild which >>> just used integers. >>> >>> Laura >> >> This type of information should be stored as a string not any type of >> numeric format, if you are not performing maths on it then it is a string >> & not a number. > > Does the same condition hold for strings? If you are not performing string > operations on something, it is not a string? > Tkinter comes to mind. You specify how widgets are laid out strings that are basically flags: text_widget.pack(side=LEFT, fill=BOTH, expand=YES) where LEFT, BOTH and YES are strings.