Chris Mellon wrote:
> On 6/12/07, HMS Surprise <[EMAIL PROTECTED]> wrote:
>> Thanks for the explaination. It didn't seem natural and from the
>> tutorial I read:
>>
>> A value can be assigned to several variables simultaneously:
>>
>> >>> x = y = z = 0 # Zero x, y and z
>>
>>
>> Maybe I in
In article <[EMAIL PROTECTED]>,
HMS Surprise <[EMAIL PROTECTED]> wrote:
> I thought if I could do this:
> >>> a = b = ''
a and b refer to the same object (the empty string)
> >>> a = 'a'
You are assigning a new value to a - it now refers to the string 'a',
while b refers to the same thing it
On 6/12/07, HMS Surprise <[EMAIL PROTECTED]> wrote:
> Thanks for the explaination. It didn't seem natural and from the
> tutorial I read:
>
> A value can be assigned to several variables simultaneously:
>
> >>> x = y = z = 0 # Zero x, y and z
>
>
> Maybe I infer too much
>
And yet, yo
Thanks for the explaination. It didn't seem natural and from the
tutorial I read:
A value can be assigned to several variables simultaneously:
>>> x = y = z = 0 # Zero x, y and z
Maybe I infer too much
thanks again,
jh
--
http://mail.python.org/mailman/listinfo/python-list
HMS Surprise schrieb:
> I thought if I could do this:
> >>> a = b = ''
Bind both the names a and b to the same string object.
> >>> a = 'a'
Bind the name a to a *new* string object with the value 'a'. This
replaces the previous binding of the name a.
> >>> la = lb = []
Bind both the names la a