📜  python 设置类变量 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:29.754000             🧑  作者: Mango

代码示例1
class MyClass:
    static_elem = 123 # This is a static element belonging to the class

    def __init__(self):
        self.object_elem = 456 # This is an instance / object element