Proper way to create an abstraction layer in python
<p>I have a project I'm working on (http://github.com/lusis/vogeler). One of the goals is to provide swappable persistance and messaging backends. I think I have a workable model in place but wanted to get input from the Python crowd about best practices. You can see the new implementation here:</p>

<p><a href="http://github.com/lusis/vogeler/blob/master/vogeler/db/generic.py" rel="nofollow">http://github.com/lusis/vogeler/blob/master/vogeler/db/generic.py</a></p>

<p>couch2.py is my subclass of generic.</p>

<p>Essentially the generic class provides a common set of interfaces (createdb, usedb, create, update) which call private methods such as _create_db, _use_db and so on.</p>

<p>My expectation is that the database specific stuff will subclass GenericPersistence and override the private methods. Is that considered bad form? Overriding private methods in general feels kind of weird but the end result is that it works. I just want to make sure I'm not breaking some sort of unwritten contract about subclassing in Python.</p>
