words_pron_dict:str 上的冒号是什么意思?我在 python 2.7 上遇到语法错误。是Python 3吗?我该如何使用它?
class TextToSpeech:
CHUNK = 1024
def __init__(self, words_pron_dict:str = 'cmudict-0.7b.txt'):
self._l = {}
self._load_words(words_pron_dict)
这是一个类型注释:https://docs.python.org/3/library/typing.html https://docs.python.org/3/library/typing.html
您应该能够将其删除。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)