Ghostly wrote:
> Thanks guys for your input
>
> As I need this for larger files (couple of tens even hundrets of MB) I
> tested your suggestion and it seems that dict method is fastest.

I decided to find out, so I ran "timeit" on both schemes using a 2MB
file.  The two methods are within 1% of each other -- sometimes the dict
is slightly faster, sometimes the list is slightly faster.  Thus, for
all practical purposes, they are identical.  I'm surprised.  That means
you should use the one that makes sense to you.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to