On Jul 15, 3:00 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Alex Popescu wrote:
> > On Jul 14, 5:55 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> > wrote:
> >> So, as always, one should measure in each specific case if optimization is
> >>
> >> worth the pain [...].
>
> > I hope I am somehow m
Alex Popescu wrote:
> On Jul 14, 5:55 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> So, as always, one should measure in each specific case if optimization is
>> worth the pain [...].
>>
>
> I hope I am somehow misreading the above sentence :-). IMO synonim
> language contructs
> shoul
On Jul 14, 5:55 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
>
> So, as always, one should measure in each specific case if optimization is
> worth the pain [...].
>
I hope I am somehow misreading the above sentence :-). IMO synonim
language contructs
should result in the same performance
En Fri, 13 Jul 2007 09:05:29 -0300, Daniel <[EMAIL PROTECTED]> escribió:
>>> > Note that every time you see [x for x in ...] with no condition, you
>>> can
>>> > write list(...) instead - more clear, and faster.
>>> >
>>> > data = list(csv.reader(open('some.csv', 'rb')))
>>>
>>> Faster? No. List C
Hrm. Repeating the test several more times, it seems that the value
fluctuates, sometimes one's faster than the other, and sometimes
they're the same.
Perhaps the minute difference between the two is statistically
insignificant? Or perhaps the mechanism underlying both (i.e. the
implementation)
On Fri, 13 Jul 2007 16:18:38 +0300, Marc 'BlackJack' Rintsch
<[EMAIL PROTECTED]> wrote:
>> $ python -m timeit -c 'import csv; data =
>> list(csv.reader(open("some.csv",
>> "rb")))'
>> 1 loops, best of 3: 44 usec per loop
>> $ python -m timeit -c 'import csv; data = [row for row in
>> csv.re
On Fri, 13 Jul 2007 15:05:29 +0300, Daniel wrote:
>>> > Note that every time you see [x for x in ...] with no condition, you
>>> can
>>> > write list(...) instead - more clear, and faster.
>>> >
>>> > data = list(csv.reader(open('some.csv', 'rb')))
>>>
>>> Faster? No. List Comprehensions are fas
>> > Note that every time you see [x for x in ...] with no condition, you
>> can
>> > write list(...) instead - more clear, and faster.
>> >
>> > data = list(csv.reader(open('some.csv', 'rb')))
>>
>> Faster? No. List Comprehensions are faster.
>
> [EMAIL PROTECTED] pdfps $ python -m timeit -c 'da
Daniel wrote:
> On Fri, 13 Jul 2007 08:51:25 +0300, Gabriel Genellina
> <[EMAIL PROTECTED]> wrote:
>
>> Note that every time you see [x for x in ...] with no condition, you
>> can write list(...) instead - more clear, and faster.
>
> Faster? No. List Comprehensions are faster.
Why do you think
On 7/12/07, Daniel <[EMAIL PROTECTED]> wrote:
> On Fri, 13 Jul 2007 08:51:25 +0300, Gabriel Genellina
> <[EMAIL PROTECTED]> wrote:
> >> data = [row for row in csv.reader(open('some.csv', 'rb'))
> >
> > Note that every time you see [x for x in ...] with no condition, you can
> > write list(...) inst
On Fri, 13 Jul 2007 08:51:25 +0300, Gabriel Genellina
<[EMAIL PROTECTED]> wrote:
>> data = [row for row in csv.reader(open('some.csv', 'rb'))
>
> Note that every time you see [x for x in ...] with no condition, you can
> write list(...) instead - more clear, and faster.
>
> data = list(csv.read
En Fri, 13 Jul 2007 02:10:17 -0300, Daniel <[EMAIL PROTECTED]> escribió:
> data = [row for row in csv.reader(open('some.csv', 'rb'))
Note that every time you see [x for x in ...] with no condition, you can
write list(...) instead - more clear, and faster.
data = list(csv.reader(open('some.csv'
On Fri, 13 Jul 2007 05:59:53 +0300, <[EMAIL PROTECTED]> wrote:
>
> How do I access the value in the second row in the first position of a
> CSV? Or the 3rd row, in the fifth position?
>
> a,b,c,d,e,f,g,h,i
> j,k,l,m,n,o,p,q,r
> r,s,t,v,w,x,y,z
>
> I'd want to get at "j" and "w". I know I can do
>
13 matches
Mail list logo