class B(type): __slots__ = () class A(metaclass=B): pass A.test = "test"
"A"是元类的实例"B"并"B"已__slots__定义 - 为什么我__dict__在课堂上A?我如何在没有__dict__?
"A"
"B"
__slots__
__dict__
A
python class python-3.x
class ×1
python ×1
python-3.x ×1