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!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:string': 0.09; 'sucks': 0.09; 'tismer': 0.09; 'wrong,': 0.09; 'python': 0.11; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sat,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'figures': 0.19; 'things.': 0.19; 'programming': 0.22; 'header :User-Agent:1': 0.23; "aren't": 0.24; 'sorry,': 0.24; "i've": 0.25; 'second': 0.26; 'gets': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; "doesn't": 0.30; "i'm": 0.30; 'asked': 0.31; '>>>>': 0.31; 'overhead': 0.31; 'probably': 0.32; 'maybe': 0.34; 'but': 0.35; 'really': 0.36; 'subject:?': 0.36; 'operating': 0.37; 'christian': 0.38; 'represent': 0.38; 'awesome': 0.38; 'nov': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'received:org': 0.40; 'how': 0.40; 'even': 0.60; 'entire': 0.61; 'world.': 0.61; 'times': 0.62; 'subject:long': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: chunking a long string? Date: Fri, 08 Nov 2013 21:06:17 +0000 References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-18-11.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: 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: 42 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1383944797 news.xs4all.nl 15924 [2001:888:2000:d::a6]:36265 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:58863 On 08/11/2013 20:53, Chris Angelico wrote: > On Sat, Nov 9, 2013 at 7:43 AM, wrote: >> Oops, sorry, I'm wrong, it can be much more. >> >>>>> sys.getsizeof('ab') >> 27 >>>>> sys.getsizeof('a\U0001d11e') >> 48 >>>>> > > I know, overhead sucks doesn't it. Python is really abysmal at that; > look how big a single bit is: > >>>> sys.getsizeof(1) > 14 >>>> sys.getsizeof(True) > 14 > > On the flip side, Python gets really awesome at some other things. > Your operating system probably takes an entire CD to distribute, maybe > even a DVD, so that's either 700MB or 4.7GB, give or take. Look how > efficiently Python can represent it: > >>>> sys.getsizeof(os) > 36 > > Wow! > > ChrisA > Those figures look really good but I actually want figures that do things my way, even if the figures aren't as good or even suck completely. Can you help me with this even if I've already asked 42 times before but have always been given the same figures in response? -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence