I have tried and it doesn't work. The variable that is called has to be defined in the class Economist. I can't define it later, or else I get an error
Quote:
Python function terminated unexpectedly: 'Economist' object has no attribute 'variable'
|
I also can't simply create an empty INDEX variable in the class and then fill it with whatever I want. The fetching doesn't work if I do that.
Global vars don't work either. The "username" variable used in self.username is not available unless inside functions... So I can't use the user input while defining class variables...