Skip to content

Commit f41b1ea

Browse files
authored
Fix Cython crashes
1 parent c8b36a8 commit f41b1ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cython/plist.pyx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,10 @@ cdef class Array(Node):
789789
return self._array.__iter__()
790790

791791
def __getitem__(self, index):
792-
return self._array[index]
792+
value = self._array[index]
793+
if isinstance(value, list):
794+
return [item.copy() for item in value]
795+
return value.copy()
793796

794797
def __setitem__(self, index, value):
795798
cdef Node n

0 commit comments

Comments
 (0)