[ZODB-Dev] Why can't I use copy.copy() on PersistentList?
Magnus Lycka
magnus@thinkware.se
Thu, 28 Nov 2002 12:46:01 +0100
Should it be like this? (I'm using ZODB 3.1b1+...)
>>> import ZODB.PersistentList
>>> pl = ZODB.PersistentList.PersistentList()
>>> pl.append(1);pl.append(1);pl.append(1);pl.append(1)
>>> pl
[1, 1, 1, 1]
>>> pl[:]
[1, 1, 1, 1] # as expected
>>> import copy
>>> copy.copy(list(pl))
[1, 1, 1, 1]
>>> copy.copy(pl)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "G:\Python22\lib\copy.py", line 84, in copy
y = _reconstruct(x, reductor(), 0)
File "G:\Python22\lib\copy.py", line 300, in _reconstruct
y = callable(*args)
TypeError: ExtensionClass object argument after * must be a sequence
>>>
:(
--
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se