I've been doing some researching, but so far, I've come across nothing that replicates my problem fully.
Here's what I'm attempting to do:
class FilterClass:
ALPHABETIC = "a";
NUMERIC = "n"
URL = "u";
def textRestriction(self, text, arguments):
if ALPHABETIC in arguments:
#do crap here
if NUMERIC in arguments:
#do other crap here
I've created variables in class FilterClass. They are to be used outside the class, as well as the methods in the class itself, but they will never be modified.
I'm encountering that global name 'ALPHABETIC' is not defined error, and adding the variable in the method and adding a global to it does nothing. I also tried adding the __init__ method, but it did nothing as well.
Can anyone tell me where did I went wrong?
if FilterClass.ALPHABETIC in arguments: