What does the colon inside the parameter mean? [duplicate]
What does the colon on words_pron_dict:str mean? I am getting syntax error on python 2.7. Is it python 3? How can i use it?
class TextToSpeech:
CHUNK = 1024
def __init__(self, words_pron_dict:str = 'cmudict-0.7b.txt'):
self._l = {}
self._load_words(words_pron_dict)
Solution 1:
It's a type annotation: https://docs.python.org/3/library/typing.html
You should be able to just remove it.