How to add property to a class dynamically?
The goal is to create a mock class which behaves like a db resultset. So for example, if a database query returns, using a dict expression, {‘ab’:100, ‘cd’:200}, then I would like to see: >>> dummy.ab 100 At first I thought maybe I could do it this way: ks = [‘ab’, ‘cd’] vs = [12, … Read more