Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'bytes.': 0.09; 'character,': 0.09; 'latter': 0.09; 'oh,': 0.09; 'python': 0.11; 'thread': 0.14; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'general.': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'otoh,': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'relates': 0.16; 'str)': 0.16; 'tuple': 0.16; 'units.': 0.16; 'usable': 0.16; 'wow,': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'trying': 0.19; 'seems': 0.21; 'header:User-Agent:1': 0.23; 'byte': 0.24; 'bytes': 0.24; 'compare': 0.26; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'nature': 0.30; "i'm": 0.30; 'url:wiki': 0.31; '>>>>': 0.31; 'factor': 0.31; 'url:wikipedia': 0.31; 'writes:': 0.31; 'know.': 0.32; 'languages': 0.32; 'stuff': 0.32; 'definition': 0.35; 'received:84': 0.35; 'but': 0.35; 'really': 0.36; 'science,': 0.36; 'url:org': 0.36; 'two': 0.37; 'to:addr :python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'how': 0.40; 'even': 0.60; 'matter': 0.61; 'email addr:gmail.com': 0.63; 'term': 0.63; 'more': 0.64; 'skip:\xe2 10': 0.65; 'header:Reply-To:1': 0.67; 'containing': 0.69; 'reply-to:no real name:2**0': 0.71; '8bit%:100': 0.72; 'url:%1': 0.72; 'computers': 0.72; 'eight': 0.74; 'characters,': 0.84; 'reply- to:addr:python.org': 0.84; 'str.': 0.91 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=ZMDuxxLb c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=0kkAYlmtguIA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=SDm1htv_dXoA:10 a=pGLkceISAAAA:8 a=8pif782wAAAA:8 a=2-dlBDGmgQYTiR9LrMIA:9 a=QEXdDO2ut3YA:10 a=MSl-tDqOz04A:10 X-AUTH: mrabarnett:2500 Date: Thu, 15 Aug 2013 15:54:14 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: python-list@python.org Subject: Re: .split() Qeustion References: <94f8428f-50b9-4ccd-95a0-6eeafda0fe18@googlegroups.com> <1376499950.3355.9802231.6A03F40D@webmail.messagingengine.com> <98e36bd1-1115-4f1d-b535-171f47408a62@googlegroups.com> <87siybuii8.fsf@nautilus.nautilus> In-Reply-To: <87siybuii8.fsf@nautilus.nautilus> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: python-list@python.org 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: 54 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1376578450 news.xs4all.nl 15993 [2001:888:2000:d::a6]:42154 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52552 On 15/08/2013 15:38, Lele Gaifax wrote: > wxjmfauth@gmail.com writes: > >> As a stupid scientist, I have the habbit to compare >> things of the same nature with the same units. >> >> This *string* containing one *character* >> >>>>> sys.getsizeof('a') >> 26 >> >> consumes 26 *bytes*. > > I'm not an expert in stupid science, and I fail to see the "common" > nature of the stuff you are comparing. Strings are not characters, and > neither the latter are bytes. > > Anyway, trying to apply the same stupid science, I notice a much more > amazing fact: > >>>> sys.getsizeof(True) > 24 > > Does Python really needs twentyfour bytes to store a *single* bit of > information?? Wow, since by definition a byte contains eight bits, > there's a factor of 192... what a shame! > > :-) > >> ————— >> >> Python seems to consider os.linesep as a >> str. >> >>>>> isinstance(os.linesep, str) >> True > > Yes, I bet in stupid languages that would be either a single character, > or a tuple of two or more characters, much more usable and compact. > >> ————— >> >> PS A "mole" is not a number. > > Oh, nice to know. And OOC, what is a "mole" in your stupid science? > OTOH, WTF does that matter in current thread and with Python in general? > A "mole" is a term from chemistry: http://en.wikipedia.org/wiki/Mole_%28unit%29 but I have no idea how it relates to Python or even to computers in general.