Unless I understand you wrong, this should be all you need:
def as_dictionary(self):
song = {
"id": self.id,
"info": self.info.as_dictionary() }
return song
>
FWIW, I just use a base class / mixin that has this method:
class UtilityObject(object): def
Hi all,
I'm trying to configure these two classes so the song class returns the
contents of the file dictionary as well but am having issues figuring this
out.
Here is what I have so far. If you have any suggestions on how I can get
Song.as_dictionary to return something like this:
> {
>
>