Object oriented storage with validation
Ilpo Nyyssönen
iny+news at iki.fi
Tue Apr 26 01:17:24 EDT 2005
Ville Vainio <ville at spammers.com> writes:
>>>>>> "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.
Would make the program too complex, unless it is done by a library. I
actually prefer saving only once and doing that in fast, reliable way.
>
> 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.
That didn't get all of the regexps. It only got the regexps that were
loaded in the time I dumped the cache.
--
Ilpo Nyyssönen # biny # /* :-) */
More information about the Python-list
mailing list