En Fri, 07 Sep 2007 05:07:03 -0300, gu <[EMAIL PROTECTED]> escribi�:

> after two days debugging my code, i've come to the point that the
> problem was caused by an unexpected behaviour of python. or by lack of
> some information about the program, of course! i've stripped down the
> code to reproduce the problem:
>
> <code>
> a = {}
>
> for x in range(10):
>      for y in range(10):
>          a[x,y] = "0"
>
> copyOfA = a

copyOfA is *NOT* a copy - it's just another name pointing to the SAME  
object as a.
Python will never copy anything unless told explicitely.

Read this <http://effbot.org/zone/python-objects.htm>

-- 
Gabriel Genellina

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

Reply via email to