Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.058 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'python': 0.11; 'stored': 0.12; '9:15': 0.16; 'bits.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'properly': 0.19; '>>>': 0.22; '31,': 0.24; 'bytes': 0.24; 'char': 0.24; 'integer': 0.24; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'something': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'reflect': 0.36; 'doing': 0.36; 'should': 0.36; 'wrong': 0.37; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'changed': 0.39; 'more': 0.64; 'fact,': 0.69; 'jul': 0.74; 'float,': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=C2KNFIbM/NuC/Wt8e4DN7vD6DPPfIQxprYUUpl6QwE0=; b=jtLi2EkMW3h9ll0Xqd1K9CIoHu+19EPuwksu3MyT0WXZGubkvB6RrR3ciYfRtxxwR8 tKlYK0GWatwLxdGdiMgaccE0EJJ1WUOCjyVqJKkZZSnPjruH4xjxMHgEm75PyBt68arz ZCYclSKDoeNviwnmTawvG+oPHDrvAv1oCPah99lvMF+mbyVvn10Q8JgRdrqNKgNRpiuF 3hfLHneWyLpis2RHlErF+j0ff7HI0ot55PW/C16VQRFfx9cjlPGbjBBkoMGJEnXJj42o 720C50lYtLRf7PpE20t5xaMKRK+MMAp6sWGTJMF5JnOebS5F0HxBAltHnm03sCpHSv5T qKtg== MIME-Version: 1.0 X-Received: by 10.220.169.146 with SMTP id z18mr12226650vcy.80.1375303301664; Wed, 31 Jul 2013 13:41:41 -0700 (PDT) In-Reply-To: <7a4be3ec-4665-4262-9cc6-286362fe2932@googlegroups.com> References: <4f1067f6-bc99-42ad-9166-37fb228b90e8@googlegroups.com> <51f14395$0$29971$c3e8da3$5496439d@news.astraweb.com> <51f15e03$0$29971$c3e8da3$5496439d@news.astraweb.com> <8203e802-9dc5-44c5-9547-6e1947ee224b@googlegroups.com> <43ce1b65-9d6d-47dd-b209-9a3bbafc0b8c@googlegroups.com> <51F7CFD1.1090403@rece.vub.ac.be> <51F7E634.2030200@mrabarnett.plus.com> <51F7EC41.5010704@rece.vub.ac.be> <51F7F48F.3070803@mrabarnett.plus.com> <39155ddf-437c-459e-ad7c-dd841810a592@googlegroups.com> <51f8a46e$0$30000$c3e8da3$5496439d@news.astraweb.com> <7a4be3ec-4665-4262-9cc6-286362fe2932@googlegroups.com> Date: Wed, 31 Jul 2013 21:41:41 +0100 Subject: Re: RE Module Performance From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375303310 news.xs4all.nl 15906 [2001:888:2000:d::a6]:41386 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51706 On Wed, Jul 31, 2013 at 9:15 PM, wrote: > ... char never consumes or requires more than 4 bytes ... > The integer 5 should be able to be stored in 3 bits. >>> sys.getsizeof(5) 14 Clearly Python is doing something really horribly wrong here. In fact, sys.getsizeof needs to be changed to return a float, to allow it to more properly reflect these important facts. ChrisA