[Python-Dev] redefining is

Neil Schemenauer nas-python at python.ca
Fri Mar 19 15:15:05 EST 2004


On Fri, Mar 19, 2004 at 03:02:54PM -0500, Andrew Koenig wrote:
> I disagree:  There are some contexts that are already written into the
> Python language--a fact that gives those contexts a status beyond mere
> application dependence.  In particular, the language says that when you use
> a particular string literal in a program, you may or may not get the same
> object, but if you get two different objects, there will be no way to
> distinguish those objects from each other without examining their identity.

sys.getrefcount() :-)

> That is not a notion I made up, nor is it dependent on any particular
> application.  It's already part of Python.

Okay, but I don't see why that implementation detail is important.

> So what I'm claiming is that there should be a way of asking:  Given two
> objects, is there any way to distinguish them aside from their identity?

Why do you need to ask that question?  Further more, why is it
important enough to require a builtin operator?

  Neil



More information about the Python-Dev mailing list