The original class structure looks like this:
class PyLibMCCache(BaseMemcachedCache):
class BaseMemcachedCache(BaseCache):
I have created a class with additional functionality called BaseTagsMemcachedCache which derives from BaseMemcachedCache, like that:
class BaseTagsMemcachedCache(BaseMemcachedCache):
Is it possible to create new class which will be the same as the PyLibMCCache (eg. with same methods and attributes), but with BaseTagsMemcachedCache as its base class? I am using Mixin (BaseTagsCacheMixin) as a workaround, but I think there might be a better solution.
You can create a new type with the same attributes but a different base class like this:
This seems rather convoluted to me, though. I’d probably go for some more straight-forward design.