On 17 October 2012 09:14, Mark Lawrence wrote:
> On 17/10/2012 05:16, 8 Dihedral wrote:
>
>> What you really want is b=a.copy()
>> not b=a to disentangle two objects.
>>
>> __eq__ is used in the comparison operation.
>>
>>
> The winner Smartest Answer by a Bot Award 2012 :)
Something seems
On 17/10/2012 05:16, 8 Dihedral wrote:
What you really want is b=a.copy()
not b=a to disentangle two objects.
__eq__ is used in the comparison operation.
The winner Smartest Answer by a Bot Award 2012 :)
--
Cheers.
Mark Lawrence.
--
http://mail.python.org/mailman/listinfo/python-list
Pradipto Banerjee於 2012年10月16日星期二UTC+8下午9時59分05秒寫道:
> 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.
>
>
>
> Currently, I have the following:
>
>
>
> ---
On Tue, Oct 16, 2012 at 9: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.
>
> Currently, I have the following:
>
>
>
> c
On Tue, 16 Oct 2012 08:51:46 -0500, 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.
It cannot be done.
Name binding ("variable = val
Am 16.10.2012 15:51 schrieb Pradipto Banerjee:
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.
This is not possible.
Currently, I have the following:
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