S
Stuart McGraw
The following was cut and pasted exactly (except for the
# lines which I added after the fact) from an interactive python
session in a Window 2000 cmd.exe window.
Can somebody please explain to me what the heck is
going on?!?!
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information..... def m1(self): print "m1"
.... def m2(self): print "m2"
....m2
# ok, both methods work and give the expected results
# so i presume they are different methods.True
# Huh? They seem to be the same. False
# But not the same...'0x8e7b48'
# Now they are different. 0x8c6d28->9202984, 0x8e7b48->93376729337672
# Now they are both equal to the second one.'0x8e7b48'
# in hex too.<built-in function hex>
# just double checking!
Why??? This is so bizarre I'm sure I am doing something
really stupid.
# lines which I added after the fact) from an interactive python
session in a Window 2000 cmd.exe window.
Can somebody please explain to me what the heck is
going on?!?!
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information..... def m1(self): print "m1"
.... def m2(self): print "m2"
....m2
# ok, both methods work and give the expected results
# so i presume they are different methods.True
# Huh? They seem to be the same. False
# But not the same...'0x8e7b48'
# Now they are different. 0x8c6d28->9202984, 0x8e7b48->93376729337672
# Now they are both equal to the second one.'0x8e7b48'
# in hex too.<built-in function hex>
# just double checking!
Why??? This is so bizarre I'm sure I am doing something
really stupid.