[RFC] store inventory in tab-separated file

Alexander Belchenko bialix at ukr.net
Mon Jan 29 09:45:50 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dmitry Vasiliev пишет:
> Alexander Belchenko пишет:
>> Dmitry Vasiliev пишет:
>>> Alexander Belchenko пишет:
>>>> Jari Aalto пишет:
>>>>>
>>>>> Perhaps just plain space, colon, semicolon or any other
>>>>> standard-visible character?
>>>> This file is not intended to be editable by user.
>>>> So I say 'no'. TAB is deliberated choice.
>>> But for CSV files parsing you can use csv builtin module which can be
>>> easy to use and faster.
>>
>> I cannot agree with you about csv module.
>> I don't think it will be faster: it's the pure python module,
>> it uses regular expressions to parse input,
>> it more complicated because it's general purpose.
>> So I'm pretty sure that it cannot be faster of my
>> strictly specialized implementation.
> 
> Actually, csv.reader is implemented in C, but only profiling can tells
> which implementation is faster.

Oh. I was wrong.
Anyway, my implementation use only splitting string by TAB.
It should not be horribly slow.

Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFvcJOzYr338mxwCURAnwBAJ9iE4wORhuY2HPuuYaJrtVUPyQ2bQCfZfRB
DJYPdvV3TSfwNdjDRPYTcSo=
=l0fA
-----END PGP SIGNATURE-----




More information about the bazaar mailing list