This PR adds debug prints of variables' memory addresses.
The following is sample code and output.
In [1]: import pysnooper
...:
...:
...: def sample_a():
...: with pysnooper.snoop():
...: a = 5
...: print(hex(id(a)))
...: b = 7
...: print(hex(id(b)))
...: c = a * b
...: print(hex(id(c)))
...:
...:
...: sample_a()
...:
Source path:... <ipython-input-1-aa3d4b446d39>
21:09:17.797662 line 6 a = 5
New var:....... a = 5 @ 0x107306500
21:09:17.797763 line 7 print(hex(id(a)))
0x107306500
21:09:17.797810 line 8 b = 7
New var:....... b = 7 @ 0x107306540
21:09:17.797839 line 9 print(hex(id(b)))
0x107306540
21:09:17.797878 line 10 c = a * b
New var:....... c = 35 @ 0x1073068c0
21:09:17.797906 line 11 print(hex(id(c)))
0x1073068c0
This PR adds debug prints of variables' memory addresses. The following is sample code and output.