Why can I not access this class member in python?
- by Peter Smit
I have the following code
class Transcription(object):
    WORD = 0
    PHONE = 1
    STATE = 2
    def __init__(self):
        self.transcriptions = []
    def align_transcription(self,model,target=Transcription.PHONE):
        pass
The important part here is that I would like to have a class member as default value for a variable. This however gives the following error:
NameError: name 'Transcription' is not defined
Why is this not possible and what is the right (pythonic) way to do something like this.