How can I create an empty object with dynamic attributes? It should be something like: >>> m = object() >>> m.myattr = 1 But this doesn't work. And I have to resort to: >>> class expando(object): pass >>> m = expando() >>> m.myattr = 1 Is there a one-liner that would do the thing? -- Cheers, Dmitry