Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '3.2': 0.05; 'int': 0.05; 'function,': 0.07; 'python': 0.08; '>>>>': 0.09; 'sizeof': 0.09; 'pm,': 0.10; '>>>': 0.12; 'wrote:': 0.14; 'float': 0.16; 'mon,': 0.17; 'bytes': 0.19; 'header:In-Reply-To:1': 0.21; 'trying': 0.23; "i'm": 0.27; 'message-id:@mail.gmail.com': 0.28; 'subject:?': 0.29; 'received:209.85.215': 0.30; 'received:209.85.215.46': 0.30; 'received:mail-ew0-f46.google.com': 0.30; 'to:addr:python-list': 0.33; 'here,': 0.35; 'received:google.com': 0.37; 'received:209.85': 0.37; 'but': 0.38; 'subject:: ': 0.38; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'show': 0.66; 'subject:this': 0.76; '100000': 0.91; 'subject:there': 0.91; 'subject:better': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=CU5etpsy+qfFDzEfXjje8YcYavHqpLT3SvGuIXSRzsc=; b=RWVeSfWQdNegYbccTgI8Jcu2EK7WgIiwye39cRhO8ihGWYMl9bq5RO3Ek2GpzIEPo/ x+PKPP+dKCpkxDRUemNFWe/KUZQ/mqJf2qdNnRW0N3dXksUMskhItlBwvTD5jfKM7wDJ k17xoeD9JFWUnmKlfTt+zziAj6McjksmQWu4o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=v+eR/8UxBPSqnv+cwxPH9HnRcI5G/JFYL4gbkxDlZCT8urulFnLzQkwZX2cp2XycJ3 2iEuetyyl1MztTno25IwULkGo3iPgx9vXCp1YadkPBtyTamLc3xD4d0Rp150H3VqkNUw zkbIpphq9o33zwXzCakxSSp7lju0/rdJ+CptI= MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 23 May 2011 16:27:58 -0400 Subject: Re: Is there a better way to solve this? From: David Robinow To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 19 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306182479 news.xs4all.nl 49174 [::ffff:82.94.164.166]:45966 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6094 On Mon, May 23, 2011 at 2:55 PM, kracekumar ramaraju wrote: > You can use sizeof function, >>>> a=12234 >>>> b=23456.8 >>>> a.__sizeof__() > 12 >>>> b.__sizeof__() > 16 > So sizeof int is 12 bytes and float is 16 bytes I'm not sure what you're trying to show here, but try the following in Python 3.2 >>> a = 9999 >>> for i in range(5): ... a*= 100000 ... a.__sizeof__() ...