Strange behavior related to value / reference

Aahz aahz at
Fri Oct 30 16:32:29 EDT 2009

In article <626f24e5-4d8e-416c-b3ed-dc56a88dc35b at>,
Lambda  <stephenhsu9 at> wrote:
>def matrix_power(m, n):
>  result = m[:]
>  print result is m

Use copy.deepcopy()
Aahz (aahz at           <*>

"You could make Eskimos emigrate to the Sahara by vigorously arguing --
at hundreds of screens' length -- for the wonder, beauty, and utility of
snow."  --PNH to rb in r.a.sf.f

More information about the Python-list mailing list