In Python, how do I type hint 'has attribute'?

后端 未结 0 1294
无人共我
无人共我 2020-12-11 08:54

Consider this contrived example;

@dataclass
class A:
    name: str = "John"
    ....

@dataclass
class B:
    name: str = "Doe         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题