Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3a.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; '(even': 0.05; 'subject:Python': 0.06; '64-bit': 0.07; 'memory.': 0.07; 'string': 0.09; '22,': 0.09; '32-bit': 0.09; 'integers': 0.09; 'pep': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'behave': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'limit.': 0.16; 'minus': 0.16; 'stuff.': 0.16; 'wrote:': 0.18; "python's": 0.19; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'bytes': 0.24; 'java': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'raise': 0.29; 'characters': 0.30; 'message-id:@mail.gmail.com': 0.30; '(maybe': 0.31; 'guess': 0.33; 'beyond': 0.35; 'received:google.com': 0.35; 'useful': 0.36; 'subject:new': 0.38; 'that,': 0.38; 'subject:" ': 0.39; 'length': 0.61; 'simply': 0.61; "you'll": 0.62; 'limit': 0.70; '2015': 0.84; 'to:none': 0.92 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:cc :content-type; bh=3a2C7cZnWhWrf+48/ff9/aW4T0tv+pJh6r1m2xb6aJo=; b=EaPXS+5jVatGvIxlZCtCOp1cAK0Yy+e4wmTXuDxKgK+WuxQVEsKDWrPzmuKs+DRwfP sLcicUIsHMk1fLu0Fq3GwdWq7IM00hLxmxOyq50m9hbuHTUT71AHr1ZbC/uxUtp9+Bfw +VQp7+8ulie+k8J+qwKbxzXvVBepoYRsVLRN9NRUcwLWDqA3sWBy2Y43IXkhXm4Bs5SO WUDkv0Seow1RIpxFuD4Mt7fJi65koz8BJw2uF1Khjmzsji19L8q9VssmiwmuMGaqXVfR jN+DpQNuKGroKMHcij8EFJkcrZ6gKpBbh1Uoxl/hYAuzEUPC0vAwVpjwPnU4TcAjnqBe wpBw== MIME-Version: 1.0 X-Received: by 10.140.21.229 with SMTP id 92mr58346778qgl.33.1421875589630; Wed, 21 Jan 2015 13:26:29 -0800 (PST) In-Reply-To: <54C01802.7020202@case.edu> References: <82qvba51o427s4m63agk6ghekm0btg81on@4ax.com> <54bfedf5$0$2876$e4fe514c@news.xs4all.nl> <54C01802.7020202@case.edu> Date: Thu, 22 Jan 2015 08:26:29 +1100 Subject: Re: How to "wow" someone new to Python From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1421875592 news.xs4all.nl 2893 [2001:888:2000:d::a6]:43568 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:84142 On Thu, Jan 22, 2015 at 8:20 AM, Matthew Ruffalo wrote: > Yes, length-unlimited strings are *extremely* useful in some > applications. I remember bitterly cursing Java's string length limit of > 2 ** 31 (maybe - 1) on multiple occasions. Python's strings seem to > behave like integers in that their size is limited only by available memory. Hmm, I don't know that you'll get much beyond 2**31 characters (even all-ASCII characters in PEP 393) on a 32-bit Python, simply because "available memory" is capped at 2**32 bytes minus other stuff. You'd need a 64-bit Python to do that, and I would guess a 64-bit Java would also raise the limit. ChrisA