En Sun, 14 Dec 2008 15:43:01 -0200, Max Argus <argus....@googlemail.com> escribió:
I stumbled across a thread about that suggests fixing deepcopy to let it copy slice objects. ( http://mail.python.org/pipermail/python-list/2006-August/398206.html). I expected this to work and don't see any reason why it shouldn't in case there is a good reason why it dosen't work can someone please explain it.
It works fine, both in 2.6 and 3.0: py> from copy import copy, deepcopy py> x = slice(1, 10, 2) py> copy(x) slice(1, 10, 2) py> deepcopy(x) slice(1, 10, 2) -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list