【发布时间】:2020-11-30 14:02:56
【问题描述】:
鉴于这两个类:
class MyClass(ABC):
@abstractmethod
def my_method(self, my_parameter: str):
pass
class MySecondClass(MyClass):
def my_method(self, my_parameter):
pass
my_method 中的MySecondClass 中的my_parameter 是否具有基于PEP 484 的Any 或str 推断类型?我在链接文档中找不到详细说明上述内容的示例。
【问题讨论】:
标签: python types subclass type-hinting mypy