In other words, is this giving me errors purely because it’s impossible to actually do or am I just writing it wrong:
class someClass:
self.myString = "Hello"
self.myMap = {
'someString' : self.functionInClass
}
So if functionInClass takes an argument, I want to call it like so from anywhere inside the class:
self.myMap[self.myString](theArgument)
This just yields:
NameError: name 'self' is not defined
Any help would be appreciated.
Yes you can do that, since methods (or bound methods) are just objects themselves.
In your code you forgot your function. I think you wanted to write somthing like this: