converting tcl database file to python
scarblac-spamtrap at pino.selwerd.nl.bbs
scarblac-spamtrap at pino.selwerd.nl.bbs
Mon Jul 17 12:10:02 EDT 2000
Bob van der Poel wrote in comp.lang.python:
> Bob Schmertz wrote:
> > Did you consider a CdItem class?
>
> No. I've looked at them but the one thing that bothered me is that
> after defining a class (aka structure) one is free to add variables a
> will.
But the same is true for dictionaries and lists anyway... Why do you think
it will be a problem? Are you going to add harmful things (like what?) in
your sleep? ;-)
Imo, if you have a problem defining a structure and it's more complex than a
simple list or dictionary, it's time to write a class.
> Yes. started a bit this PM. I think that what I'll do is write a
> conversion in tcl and end up with a very-verbose datafile format. With
> PentiumIIs who cares about a few extra cycles of overhead parsing a
> file. I've just gotta get into the 21th century.
Or let the program write its output as Python style expressions, so you can
eval them again like the Tcl did :-)
--
Remco Gerlich, scarblac at pino.selwerd.nl
5:57pm up 133 days, 6:07, 6 users, load average: 0.53, 0.33, 0.13
More information about the Python-list
mailing list