kovidgoyal/calibre — pull request #142 by cbhaley (2013-11-24 08:35:46+00:00)
Title: Make the smart device cache return instances of USBMS.Book instead of ...

...Book.Metadata. This is probably not the most efficient way of doing this because it initializes attributes that it subsequently replaces with the __dict__ copy, but I don't see another way to ensure that all the class attributes and properties of the original instance (a subclass of Metadata) are in the new instance.