Skip to content

Commit 2634e67

Browse files
author
hartsantler
committed
dart backend: fixed null list slice a[:]
1 parent 634ffd1 commit 2634e67

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pythonjs/runtime/dart_builtins.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ def __setitem__(self, index, value):
4343

4444
def __getslice__(self, start, stop, step):
4545
if stop == null and step == null:
46-
return self[...].sublist( start )
46+
return list( self[...] )
4747
elif stop == null:
48-
return self[...].sublist(start)
48+
return list( self[...].sublist(start) )
4949
elif stop < 0:
5050
stop = self[...].length + stop
5151
if start != null:
52-
return self[...].sublist(start, stop)
52+
return list( self[...].sublist(start, stop) )
5353
else:
54-
return self[...].sublist(0, stop)
54+
return list( self[...].sublist(0, stop) )
5555

5656
def __add__(self, other):
5757
self[...].addAll( other[...] )

0 commit comments

Comments
 (0)