Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79734
| Date | 2014-10-27 00:20 +0000 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: id == vs is |
| References | <CAGGBd_qwcZuReU6rY9bcAa-xH2Kc25dCjubF2SsjppxP3L3J9Q@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15207.1414369235.18130.python-list@python.org> (permalink) |
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! >
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: id == vs is MRAB <python@mrabarnett.plus.com> - 2014-10-27 00:20 +0000
csiph-web