I am trying to make it so that when i am setting a variable, I get a compile-type error when I misspell it. in all my attempts so far, the variable just gets created.
I don't mind to put the variables in a class, a module, a dictionary or any combination. I just want to have a compile time error on misspeling
here is an example:
class Foo:
bar=""
def __init__(self,bar_value):
self.barr=bar_value # want syntax error here
the_foo=Foo("hellow")
edit: I had my terminology wrong: I meant static typing