table driven code [was: Breaking String into Values]

Steven Majewski sdm7g at Virginia.EDU
Fri Mar 29 19:36:36 EST 2002


On Fri, 29 Mar 2002, I  wrote:

> Sometimes, with data file conversion problems, I will make an intermediate
> class to represent the abstract object, with methods to load from or dump
> to the particular representation format.
>
>
> Again -- it's more overhead to do it that way, but I've usually found
> it worth it in the long run.

I should add, that the reason it's usually been worth doing that way,
is that once I've done an "A to B" converter, typically, it's not long
before I find I need a "B to A converter" or a batch editor to change
some field in a directory full of files, or a 'splitter' or a 'merger'
or something to gather statistics from the files...

But if you're *sure* that you're only going to do this once, then by
all means, go ahead and go all out for speed! ;-)

-- Steve Majewski






More information about the Python-list mailing list