On Nov 23, 2007 4:06 PM, Roc Zhou <[EMAIL PROTECTED]> wrote: > This is the result comes from the Linux. > > And the result from Windows is: > > >>> class Test: > var = 1 > def func(self): pass > >>> x = Test() > >>> y = Test() > >>> x.var is y.var > True > >>> x.func is y.func > False > >>> id(x.var) > 11228488 > >>> id(y.var) > 11228488 > >>> id(x.func) > 14430976 > >>> id(y.func) > 14433656 > 估计只能看源码去了。不管怎么样比较变量的结果是预期的,而比较两个方法似乎是用处不大。
-- I like python! UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/ meide <<wxPython UI module>>: http://code.google.com/p/meide/ My Blog: http://www.donews.net/limodou -- http://mail.python.org/mailman/listinfo/python-list