Forget slots (https://elfsternberg.com/2009/07/06/python-what-the-hell-is-a-slot/ …), what the hell is a dict? class Evil: __dict__ = None def __init__(self, x, y): self.x = x self.y = y >>> e = Evil(2,3) >>> dir(e) ... stare at it closely ... >>> e.__dict__ >>> e.x 2 >>> e.z ='wat' >>>
-
-
Ok. Enough frivolity for now. BTW: You can't spell "Enterprise" without "E".
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
David, could u please give an ultimate explanation of this behavior?Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
That’s all about scope and class attributes vs instance attributes. Nice!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
__dict__ is "__dict__" in __dict__
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
oh, god
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.