musicpack / mbox

Music Box is a music player widget in a Discord message.
7 stars 2 forks source link

TypedDict vs dataclass record class #151

Closed borisliao closed 3 years ago

borisliao commented 3 years ago

Describe what needs to be changed. Use a dictionary to share database records instead of a dataclass

Additional context Originally posted by @Exsects in https://github.com/mbox-contributors/mbox/issues/142#issuecomment-877543085

borisliao commented 3 years ago

A record object in my opinion is the best since we know what the keys of your dict will always be at code writing time and we are going to have several functions that take the whole dictionary as an argument.