I've tried a number of other approaches, and they're all more complex than what I currently have. `collections.Iterable` is just too generic to match against, so I have to explicitly deal with other boundary cases. If you're hell-bent on having the most general `todict` implementation I can push my best set of changes, otherwise I'm happy to merge as is.