[issue33685] Instances bound methods with different memory addresses but sharing same id

2018-05-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: ID numbers in Python are only guaranteed to be unique for the lifespan of the object. In CPython they can be re-used. (In other implementations, like Jython and IronPython, IDs are allocated as sequential numbers and won't be reused.) The other fact you

[issue33685] Instances bound methods with different memory addresses but sharing same id

2018-05-29 Thread Marcelo Alves
New submission from Marcelo Alves : Different instances should have different bound method ids, since they have different memory addresses, isn’t it? Example: I have a class and two instances: class MyClass: def something(): pass a = MyClass() b = MyClass()