Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!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; 'from:addr:yahoo.co.uk': 0.04; 'encoded': 0.07; 'string': 0.09; 'ascii': 0.09; 'bytes.': 0.09; 'lawrence': 0.09; 'pep': 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; 'tismer': 0.09; 'wrong,': 0.09; 'python': 0.11; "can't.": 0.16; 'does,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'time"': 0.16; 'ignore': 0.16; 'language': 0.16; 'wrote:': 0.18; 'programming': 0.22; 'header:User-Agent:1': 0.23; 'sorry,': 0.24; 'second': 0.26; 'world,': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'characters': 0.30; "i'm": 0.30; 'asked': 0.31; 'code': 0.31; '>>>>': 0.31; 'but': 0.35; "he's": 0.36; 'subject:?': 0.36; 'christian': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'users': 0.40; 'read': 0.60; 'numbers': 0.61; 'world.': 0.61; 'email addr:gmail.com': 0.63; 'between': 0.67; 'glad': 0.83; 'rubbish': 0.84; 'subject:long': 0.84 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 20:57:32 +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: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1383944273 news.xs4all.nl 15909 [2001:888:2000:d::a6]:54943 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:58858 On 08/11/2013 20:43, wxjmfauth@gmail.com wrote: > > "(say, 1 kbyte each)": one "kilo" of characters or bytes? > > Glad to read some users are still living in an ascii world, > at the "Unicode time" where an encoded code point size may vary > between 1-4 bytes. > > > Oops, sorry, I'm wrong, it can be much more. > >>>> sys.getsizeof('ab') > 27 >>>> sys.getsizeof('a\U0001d11e') > 48 >>>> > > jmf > > For any newcomers please ignore the rubbish that "Joseph McCarthy" Faust comes up with from time to time. He's been asked repeatedly to come up with evidence to support his claims regarding PEP 393, the Flexible String Representation, but he never does, clearly because he can't. Instead he provides micro benchmarks or meaningless numbers like those above. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence