[Tutor] Identifying objects
Mon, 27 Sep 1999 09:14:42 -0700 (Pacific Daylight Time)
On Mon, 27 Sep 1999, K P wrote:
> How would I detect object recursing(that may not be the real term
> for it)? For example, I have:
> class myObject():
> def myFunct(param)
> tempObj = myObject()
> How would tempObj.myFunct determine that its own object was
> passed to it?
if param is self:
Note that 'is' tests reference identity, while == tests value equality.