Object oriented storage with validation (was: Re: Caching compiled regexps across sessions (was Re: Regular Expressions - Python vs Perl))
Ville Vainio
ville at spammers.com
Sun Apr 24 17:44:57 EDT 2005
>>>>> "Ilpo" == Ilpo Nyyssönen <iny> writes:
Ilpo> Pickle doesn't have validation. I am not comfortable for
Ilpo> using it as storage format that should be reliable over
Ilpo> years when the program evolves. It also doesn't tell me if
That's why you should implement xml import/export mechanism and use
the xml file as the "canonical" data, while the pickle is only a cache
for the data.
Ilpo> How can it work automatically in separate module? Replacing
Ilpo> the re.compile with something sounds possible way of getting
Ilpo> the regexps, but how and where to store the compiled data?
Ilpo> Is there a way to put it to the byte code file?
Do what you already did - dump the regexp cache to a separate file.
--
Ville Vainio http://tinyurl.com/2prnb
More information about the Python-list
mailing list