在Pycharm中重新构造文本以指定字典内容

2024-04-19 08:10:46 发布

您现在位置:Python中文网/ 问答频道 /正文

如何使用重构文本指定字典基类的内容?你知道吗

class A(dict):
    """
    some restructered text here?
    """
    pass

a = A()
a["key1"] = B()
a["key2"] = B()
a["key3"] = 1 # here I'd like pycharm to show warning about types mismatch

Tags: text文本内容字典heresomepass基类