So python is dynamic. I should be able to add attributes to class instances willy-nilly.
I'm trying to do this:
spam = None
spam.eggs = []
But apparently I can't add an attribute to None
.
How do I define spam
as an instance of an undefined 'empty class' to which I can add attributes as I go along?