Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #58857
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.030 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'subject:string': 0.09; 'sucks': 0.09; 'wrong,': 0.09; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'things.': 0.19; '>>>': 0.22; 'sorry,': 0.24; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; '>>>>': 0.31; 'overhead': 0.31; 'probably': 0.32; 'maybe': 0.34; 'received:google.com': 0.35; 'really': 0.36; 'subject:?': 0.36; 'operating': 0.37; 'represent': 0.38; 'awesome': 0.38; 'nov': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'how': 0.40; 'even': 0.60; 'entire': 0.61; 'subject:long': 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=gkXKL64+dUTGdbGs9y1s723EZviFHx+XEG1asI4oBy4=; b=g3ryI0LZ/ulYUeCj25Qsup80fE8ggTq6H2NtOAwqDc9YYs4gTbt3hv5XWJR1Spjhg3 H/QxlzrINbqseyWdBiaAXio34UHByP3uWJsw3USL7/Om4iEwh74C8pk9k0Uy99dt7lUZ enXhzsoQW1QXE8TZ3oifmd95oc2KdvRy5n7cQGEkd8Ww470agJX82ZL9HOy/7UPgmVnc 5tJyaHoZyR2zJEA22vrCSn+gOaVaQWRQ+A3U8cVN3tE1z+66UCXao1jtpWs9fF/ouGFa UFh3DKktpSjRqm4eivgElabUqcpx/vBYAnJjvi6K4sv5/HN/kXJMRAdiIaxLAKfRCztr Y7rg== |
| MIME-Version | 1.0 |
| X-Received | by 10.68.217.226 with SMTP id pb2mr16836272pbc.165.1383943990848; Fri, 08 Nov 2013 12:53:10 -0800 (PST) |
| In-Reply-To | <c1bb3377-4425-4707-9ae7-aa7251cebc75@googlegroups.com> |
| References | <mailman.2232.1383932895.18130.python-list@python.org> <c1bb3377-4425-4707-9ae7-aa7251cebc75@googlegroups.com> |
| Date | Sat, 9 Nov 2013 07:53:10 +1100 |
| Subject | Re: chunking a long string? |
| From | Chris Angelico <rosuav@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.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2254.1383943995.18130.python-list@python.org> (permalink) |
| Lines | 28 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1383943995 news.xs4all.nl 15946 [2001:888:2000:d::a6]:51998 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:58857 |
Show key headers only | View raw
On Sat, Nov 9, 2013 at 7:43 AM, <wxjmfauth@gmail.com> 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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
chunking a long string? Roy Smith <roy@panix.com> - 2013-11-08 12:48 -0500
Re: chunking a long string? wxjmfauth@gmail.com - 2013-11-08 12:43 -0800
Re: chunking a long string? Chris Angelico <rosuav@gmail.com> - 2013-11-09 07:53 +1100
Re: chunking a long string? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-08 20:57 +0000
Re: chunking a long string? Tim Chase <python.list@tim.thechases.com> - 2013-11-08 15:04 -0600
Re: chunking a long string? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-08 21:06 +0000
Re: chunking a long string? Chris Angelico <rosuav@gmail.com> - 2013-11-09 08:04 +1100
Re: chunking a long string? Chris Angelico <rosuav@gmail.com> - 2013-11-09 08:17 +1100
Re: chunking a long string? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-09 00:46 +0000
Re: chunking a long string? wxjmfauth@gmail.com - 2013-11-09 00:14 -0800
Re: chunking a long string? Chris Angelico <rosuav@gmail.com> - 2013-11-09 19:26 +1100
Re: chunking a long string? Roy Smith <roy@panix.com> - 2013-11-09 09:37 -0500
Re: chunking a long string? Chris Angelico <rosuav@gmail.com> - 2013-11-10 02:02 +1100
Re: chunking a long string? Roy Smith <roy@panix.com> - 2013-11-09 10:21 -0500
Re: chunking a long string? Chris Angelico <rosuav@gmail.com> - 2013-11-10 02:30 +1100
Re: chunking a long string? Roy Smith <roy@panix.com> - 2013-11-09 10:35 -0500
Re: chunking a long string? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-09 15:37 +0000
Re: chunking a long string? Chris Angelico <rosuav@gmail.com> - 2013-11-10 09:14 +1100
Re: chunking a long string? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-10 06:39 +0000
Re: chunking a long string? Chris Angelico <rosuav@gmail.com> - 2013-11-10 19:46 +1100
Re: chunking a long string? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-09 10:13 +0000
Re: chunking a long string? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-09 00:54 +0000
csiph-web