How python handles object instantiation in a ' for' loop
问题 I've got a highly complex class : class C: pass And I've got this test code : for j in range(10): c = C() print c Which gives : <__main__.C instance at 0x7f7336a6cb00> <__main__.C instance at 0x7f7336a6cab8> <__main__.C instance at 0x7f7336a6cb00> <__main__.C instance at 0x7f7336a6cab8> <__main__.C instance at 0x7f7336a6cb00> <__main__.C instance at 0x7f7336a6cab8> <__main__.C instance at 0x7f7336a6cb00> <__main__.C instance at 0x7f7336a6cab8> <__main__.C instance at 0x7f7336a6cb00> <__main__