Quote:
Originally Posted by user_none
This has nothing to do with your question, but why are you tracing a MetaInformation inside of your SeriesBook class instead of making it a subclass? This would allow you to pass the SeriesBook in places a MetaInformation can be used. This construct should provide you with cleaner code that is easier to work with.
|
It's a good question. The main reason was that given in the comments for the class, of keeping the methods on the class to a minimum because of all that funky lookup stuff it does when class attributes are requested. I figured I would be much safer just wrapping it in the way I did in case one of my attributes conflicted with some future Calibre column name or whatever. It's not that big of a deal to pass seriesBook.mi instead of seriesBook to a function and sounded safer.
Besides which, the call to db.get_metadata is going to give me mi instances which is my normal starting point for the data. So I would have the problem of coercing one of those into a SeriesBook class?