Skip to content

Tag: class

KeyError for multiframe tkinter?

I keep getting a KeyError and I am unsure why. I added a print statement and printed the self.frames dict to ensure that the keys existed, and it appears they do. I’m new to using classes to create multi frame apps so any insight would be helpful. The error: The dict that prints: The code where the erro…

does class declaration statement cause memory allocation in python?

I know that in languages like c++, memory is not allocated until instantiation. Is it the same in python? I’m reading the How to think like a computer scientist course. In that course, to elaborate this snippet, a weird figure is given: This Figure is given: What I get from the figure, Is that after the…