class Student: __slots__ = ('name','age')S=Student()S.name='刘备'S.age=110print(dir(S))
Sign in to make a reply
永恒之约bo