Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19226

Re: Looking under Python's hood: Will we find a high performance or clunky engine?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <modelnine@modelnine.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.08; 'fred': 0.09; 'question?': 0.09; 'code?': 0.16; 'iterates': 0.16; 'received:10.2': 0.16; 'subject: \n ': 0.16; 'subject:engine': 0.16; 'subject:find': 0.16; "aren't": 0.21; 'header:In-Reply-To:1': 0.22; "shouldn't": 0.23; 'skip:[ 10': 0.27; 'lines': 0.30; 'subject:?': 0.30; '---': 0.31; 'correct': 0.31; 'does': 0.32; 'changes': 0.32; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.33; 'it?': 0.33; 'file': 0.35; 'passed': 0.37; 'received:org': 0.37; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; 'your': 0.61; 'presented': 0.62; 'choice.': 0.64; 'so:': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=simple/simple; d=modelnine.org; s=modelnine1012; t=1327254740; bh=cFu9TWDyPNMvpGBSBMMI9XIakFLNPQMNSI63khlf2PM=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=fP4kUuZUeOdUutTdd6N2Koh8T9u8kIrJAZu/707KGg1rEdWNR2i7L88JB6g+iQJrv e8jU0PjroBmVZtmhmdq/J6S4O0LoX9NDi/ZS9aoZeDCYTJglhoQJcbxMCINsPXQVoT 82/souCTSwvevrXbym6HGd3oH4Yg0c+kc1HTDDOg=
Date Sun, 22 Jan 2012 18:52:21 +0100
From Heiko Wundram <modelnine@modelnine.org>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20120118 Thunderbird/10.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Looking under Python's hood: Will we find a high performance or clunky engine?
References <3c0bb3d0-6b80-44ec-848a-7296d526c047@t8g2000yqg.googlegroups.com>
In-Reply-To <3c0bb3d0-6b80-44ec-848a-7296d526c047@t8g2000yqg.googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4929.1327254749.27778.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1327254749 news.xs4all.nl 6895 [2001:888:2000:d::a6]:44040
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19226

Show key headers only | View raw


Am 22.01.2012 16:50, schrieb Rick Johnson:
> What does Python do when presented with this code?
>
> py>  [line.strip('\n') for line in f.readlines()]
>
> If Python reads all the file lines first and THEN iterates AGAIN to do
> the strip; we are driving a Fred flintstone mobile. If however Python
> strips each line of the lines passed into readlines in one fell swoop,
> we made the correct choice.
>
> Which is it Pythonistas? Which is it?

You aren't one (considering how vocal you are in arguing for changes to 
the language)?

So: shouldn't you be able to answer your own question?

-- 
--- Heiko.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Looking under Python's hood: Will we find a high performance or clunky engine? Rick Johnson <rantingrickjohnson@gmail.com> - 2012-01-22 07:50 -0800
  Re: Looking under Python's hood: Will we find a high performance or clunky engine? Heiko Wundram <modelnine@modelnine.org> - 2012-01-22 18:52 +0100
  Re: Looking under Python's hood: Will we find a high performance or clunky engine? Robert Kern <robert.kern@gmail.com> - 2012-01-22 18:01 +0000
    Re: Looking under Python's hood: Will we find a high performance or clunky engine? 88888 Dihedral <dihedral88888@googlemail.com> - 2012-01-23 10:56 -0800
    Re: Looking under Python's hood: Will we find a high performance or clunky engine? 88888 Dihedral <dihedral88888@googlemail.com> - 2012-01-23 10:56 -0800
      Re: Looking under Python's hood: Will we find a high performance or clunky engine? alex23 <wuwei23@gmail.com> - 2012-01-23 22:44 -0800
        Re: Looking under Python's hood: Will we find a high performance or clunky engine? Chris Angelico <rosuav@gmail.com> - 2012-01-24 19:14 +1100
  Re: Looking under Python's hood: Will we find a high performance or clunky engine? Michael Torrie <torriem@gmail.com> - 2012-01-22 17:38 -0700
    Re: Looking under Python's hood: Will we find a high performance or clunky engine? Rick Johnson <rantingrickjohnson@gmail.com> - 2012-01-22 17:04 -0800
      Re: Looking under Python's hood: Will we find a high performance or clunky engine? Michael Torrie <torriem@gmail.com> - 2012-01-22 18:32 -0700
  Re: Looking under Python's hood: Will we find a high performance or clunky engine? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-23 09:11 +0000
  Re: Looking under Python's hood: Will we find a high performance or clunky engine? Grant Edwards <invalid@invalid.invalid> - 2012-01-23 16:08 +0000

csiph-web