Help Create Good Data Model

Carl Banks invalidemail at aerojockey.com
Sun Mar 12 17:15:51 EST 2006


mwt wrote:
> One thing I'm still not sure about -- and I suspect that there is no
> right answer -- is the fact that although I am writing the code in
> Python, the idiom is purely Java. Having my data bucket in the form of,
> essentially, a bean with setters and getters, and each method
> surrounded by (the Python version of) a "synchronized" piece, and so on
> all comes from my Java background. It's ending up working well as code
> (I'm a lot further along today), and it's accomplishing the decoupling
> of front and back end I was looking for, so that's excellent. However I
> do have the vague feeling that I am doing the equivalent of, say,
> writing Greek hexameters in English (i.e. it works but it is
> stylistically clunky).

However, have a look at the Queue module.  It's arguably more Pythonic,
in the sense that it's in the standard libarary.  But interally it's
fairly similar to how you're doing it.  (It has a few extra locks to
handle empty and full conditions, IIRC.)

Carl Banks




More information about the Python-list mailing list