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

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to