Dear all,
I am a bit puzzled, as
-snip-
import bz2
f=bz2.BZ2File('data/data.bz2');
while f.readline():
pass
-snip-
takes twice the time (10 seconds) to read/decode a bz2 file
compared to
-snip-
import bz2
f=bz2.BZ2File('data/data.bz2');
x=f.readlines()
-snip
Thanks a lot for all the answers!!
Soeren
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 2005-07-24 at 11:50 -0700, Robert Kern wrote:
> Soeren Sonnenburg wrote:
> > On Sun, 2005-07-24 at 13:36 +1000, Steven D'Aprano wrote:
> >
> >>On Sat, 23 Jul 2005 18:30:02 +0200, Soeren Sonnenburg wrote:
[...]
> >>Lists in Python can con
On Sat, 2005-07-23 at 12:15 -0700, Robert Kern wrote:
> Soeren Sonnenburg wrote:
> > Hi all,
> >
> > Just having started with python, I feel that simple array operations '*'
> > and '+' don't do multiplication/addition but instead extend/join
On Sat, 2005-07-23 at 20:25 -0700, Dan Bishop wrote:
> Soeren Sonnenburg wrote:
> > Hi all,
> >
> > Just having started with python, I feel that simple array operations '*'
> > and '+' don't do multiplication/addition but instead extend/j
On Sun, 2005-07-24 at 13:36 +1000, Steven D'Aprano wrote:
> On Sat, 23 Jul 2005 18:30:02 +0200, Soeren Sonnenburg wrote:
>
> > Hi all,
> >
> > Just having started with python, I feel that simple array operations '*'
> > and '+' don&
On Sat, 2005-07-23 at 23:35 +0200, Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, Soeren
> Sonnenburg wrote:
>
> > Just having started with python, I feel that simple array operations '*'
> > and '+' don't do multiplica
Hi all,
Just having started with python, I feel that simple array operations '*'
and '+' don't do multiplication/addition but instead extend/join an
array:
a=[1,2,3]
>>> b=[4,5,6]
>>> a+b
[1, 2, 3, 4, 5, 6]
instead of what I would have expected:
[5,7,9]
or
>>> 2*a
[1, 2, 3, 1, 2, 3]
Well it i