📜  使用 python 遍历对象 - TypeScript 代码示例

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

代码示例2
class C:
    a = 5
    b = [1,2,3]
    def foobar():
        b = "hi"    

for attr, value in C.__dict__.iteritems():
    print "Attribute: " + str(attr or "")
    print "Value: " + str(value or "")