Best way to do data source abstraction

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Thu Jun 1 04:02:34 EDT 2006


Arthur Pemberton enlightened us with:
> What is the best way to do data source abtraction?

That depends on your data source. For files, file-like objects are an
abstraction. For databases there is PEP 249.

> I was thinking of almost having classA as my main class, and have
> classA dynamically "absorb" classFood into to based on the extension
> of the input file received by classA. But this doesn't seem
> possible.

You don't explain the most important part - "absorb". What does that
mean? And what does it mean to have classA "almost" as your main
class?

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list