类似于C++中的引用计数
1 >>> x = 5
2 >>> y = x
3 >>> x == y
4 True
5 >>> x is y
6 True
7 >>> y = 3
8 >>> x == y
9 False
10 >>> x is y
11 False
1 >>> x = 5
2 >>> y = x
3 >>> x == y
4 True
5 >>> x is y
6 True
7 >>> y = 5
8 >>> x == y
9 True
10 >>> x is y
11 True
12 >>> y = 3
13 >>> x == y
14 False
15 >>> x is y
16 False
posted on 2013-05-16 19:21
unixfy 阅读(84)
评论(0) 编辑 收藏 引用