Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6094

Re: Is there a better way to solve this?

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 <drobinow@gmail.com>
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 <a6f25b6b-ddfe-435a-9035-5f156888d2b5@glegroupsg2000goo.googlegroups.com>
References <mailman.1906.1306046523.9059.python-list@python.org> <a6f25b6b-ddfe-435a-9035-5f156888d2b5@glegroupsg2000goo.googlegroups.com>
Date Mon, 23 May 2011 16:27:58 -0400
Subject Re: Is there a better way to solve this?
From David Robinow <drobinow@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1986.1306182479.9059.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Mon, May 23, 2011 at 2:55 PM, kracekumar ramaraju
<kracethekingmaker@gmail.com> 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__()
...

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Is there a better way to solve this? kracekumar ramaraju <kracethekingmaker@gmail.com> - 2011-05-23 11:55 -0700
  Re: Is there a better way to solve this? David Robinow <drobinow@gmail.com> - 2011-05-23 16:27 -0400
  Re: Is there a better way to solve this? Terry Reedy <tjreedy@udel.edu> - 2011-05-23 18:06 -0400

csiph-web