Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31404 > unrolled thread
| Started by | Dave Angel <d@davea.name> |
|---|---|
| First post | 2012-10-16 10:09 -0400 |
| Last post | 2012-10-16 10:09 -0400 |
| 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.
Re: overriding equals operation Dave Angel <d@davea.name> - 2012-10-16 10:09 -0400
| From | Dave Angel <d@davea.name> |
|---|---|
| Date | 2012-10-16 10:09 -0400 |
| Subject | Re: overriding equals operation |
| Message-ID | <mailman.2279.1350396595.27098.python-list@python.org> |
On 10/16/2012 09:51 AM, Pradipto Banerjee wrote:
> I am trying to define class, where if I use a statement a = b, then instead of "a" pointing to the same instance as "b", it should point to a copy of "b", but I can't get it right.
>
>
The __eq__ method is called for equals comparison, like
if myinst == otherobj:
There are no hooks for the binding operator (=)
--
DaveA
Back to top | Article view | comp.lang.python
csiph-web