下面的方法是在pubsub.py中定义的,它是站点包pubsub中的一个python文件。当我尝试使用它时,pycharm告诉我这是无效的语法,并且有一个箭头指向'->‘。我不知道为什么,我已经安装了pypubsub。
def getDefaultPublisher() -> Publisher:
"""
Get the Publisher instance created by default when this module
is imported. See the module doc for details about this instance.
"""
return _publisher发布于 2018-06-14 20:27:23
您的Python版本不匹配。此版本的PyPubSub需要Python3。Python2的最新版本是PyPubSub 3.3.0
pip install PyPubSub==3.3.0https://stackoverflow.com/questions/42140876
复制相似问题