Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #79734 > unrolled thread

Re: id == vs is

Started byMRAB <python@mrabarnett.plus.com>
First post2014-10-27 00:20 +0000
Last post2014-10-27 00:20 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: id == vs is MRAB <python@mrabarnett.plus.com> - 2014-10-27 00:20 +0000

#79734 — Re: id == vs is

FromMRAB <python@mrabarnett.plus.com>
Date2014-10-27 00:20 +0000
SubjectRe: id == vs is
Message-ID<mailman.15207.1414369235.18130.python-list@python.org>
On 2014-10-27 00:12, Dan Stromberg wrote:
> Are the following two expressions the same?
>
> x is y
>
> Id(x) == id(y)
>
> ?
>
Yes.

> I ported some Java code to Python, and it was using Java's idea of
> equality (via ==) in some places.  Right now, I have a suite of unit
> tests working using the second expression above, but I'm thinking
> about switching to the first.
>
> Thanks!
>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web