I found this why multiple processes have the same object id in python, but I do not quite understand what does it mean "because both processes execute the same code", I try the code, it seems the outputs are always the same.
➜ ~ python test2.py
4419085696
4419085696
➜ ~ python test2.py
4342830464
4342830464
➜ ~ python test2.py
4510156160
4510156160
➜ ~ python test2.py
4329948544
4329948544
➜ ~ python test2.py
4468004224
4468004224
➜ ~ python test2.py
4326647168
4326647168
➜ ~ python test2.py
4445738368
4445738368
➜ ~ python test2.py
4388980096
4388980096
➜ ~ python test2.py
4511999360
4511999360
➜ ~ python test2.py
4562851200
4562851200
➜ ~ python test2.py
4535031168
4535031168
➜ ~ python test2.py
4314420608
4314420608
➜ ~ python test2.py
4536034688
4536034688
I also find this refer http://code.activestate.com/lists/python-list/656748/ on web. It also seems that python multiple processes shares the same object.
Anyone could help to explain a bit further? Thanks in advance.