So I'm toying around with the idea of making myself (and anyone who cares to use it of course) a little boilerplate library in Python for Pygame. I would like a system where settings for the application are provided with a yaml file.
So I was thinking it would be useful if the library provided a default yaml tree and merged it with a user supplied one. For usability sake I wonder if possible there are any out there who can divine a routine where:
In any case in the tree where the user supplied yaml overlaps the default, the user supplied branches replace the library supplied ones.
In any case where the user supplied yaml does not overlap the default tree, the default tree persists.
Any superflous branches in the tree provided by the user supplied yaml are appended.
I know this explanation was verbose as it is probably clear what I'm asking for. I wonder if it is a bit much to get for free.