I would like to be able to test whether two callable objects are the same or not. I would prefer identity semantics (using the \"is\" operator), but I\'ve discovered that wh
You can use foo is bar that is the same id(foo) == id(bar) to check identity. If you want to check 'equality' (value) use ==.
foo is bar
id(foo) == id(bar)
==