Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'float': 0.05; 'currency': 0.07; 'suppose': 0.07; 'python': 0.09; 'complicate': 0.09; 'int)': 0.09; 'integer,': 0.09; 'lawrence': 0.09; 'matplotlib': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'windows,': 0.09; 'thread': 0.11; 'aug': 0.13; 'sat,': 0.15; 'aided': 0.16; 'debated': 0.16; 'module?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'say.': 0.16; 'subject:Objects': 0.16; 'threads': 0.16; 'wrote:': 0.17; 'instance,': 0.17; 'integer': 0.17; '(or': 0.18; 'trying': 0.21; "i've": 0.23; 'testing': 0.24; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; '(which': 0.26; 'fit': 0.26; 'wondering': 0.26; 'header:X-Complaints-To:1': 0.28; 'chris': 0.28; 'fine': 0.28; 'decimal': 0.29; 'represented': 0.29; 'class': 0.29; "i'm": 0.29; 'from:addr:yahoo.co.uk': 0.32; 'could': 0.32; 'to:addr:python-list': 0.33; 'know.': 0.33; "can't": 0.34; 'pm,': 0.35; 'received:org': 0.36; 'why': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'store': 0.38; 'things': 0.38; 'shows': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'deliver': 0.60; 'days': 0.60; 'bring': 0.62; 'back': 0.62; 'times': 0.63; 'information,': 0.63; 'fun': 0.64; 'here': 0.65; 'opinions': 0.72; 'cent': 0.84; 'come.': 0.84; 'compliance,': 0.84; 'everything,': 0.84; 'received:89': 0.86 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Objects in Python Date: Sat, 25 Aug 2012 12:01:07 +0100 References: <18409992-1e28-4721-8e64-60c69668da4e@googlegroups.com> <87d32i1ntc.fsf@benfinney.id.au> <5035d3e4$0$1645$c3e8da3$76491128@news.astraweb.com> <50366ec8$0$6574$c3e8da3$5496439d@news.astraweb.com> <503840c5$0$6574$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-89-240-160-192.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-Antivirus: avast! (VPS 120824-2, 24/08/2012), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345892364 news.xs4all.nl 6947 [2001:888:2000:d::a6]:36739 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27863 On 25/08/2012 11:23, Chris Angelico wrote: > On Sat, Aug 25, 2012 at 6:55 PM, Mark Lawrence wrote: >> I'm just wondering out aloud if the number of times this type of thread has >> been debated here will fit into a Python long or float? > > Well, when I have to store currency information, I like to store it as > an integer, using the native currency's "small unit" (eg the cent in > dollar+cent currencies). In this instance, instead of trying to count > the threads (which would be fractional), just count the number of > posts. It then is an integer, and I've yet to find any integer that > can't be represented as a Python long (or, in 3.x, int). > > ChrisA > That could have been fun in the good old days of pounds, shillings and pence. Why they had to complicate things by going decimal I shall never know. Bring back simplistic imperial measures for everything, that's what I say. Using long just shows I've still got a Python 2 hat on. Still when those fine people who develop Matplotlib deliver 1.2 with its Py3k compliance, aided or hindered by me testing on Windows, Python 3.3 here I come. I suppose an alternative to long (or int) or float would have been the Decimal class from the decimal module? Opinions on this anybody? -- Cheers. Mark Lawrence.