8000 Better error reporting in sequence · go-python/gpython@5511993 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5511993

Browse files
committed
Better error reporting in sequence
1 parent c1949ed commit 5511993

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py/sequence.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func SequenceTuple(v Object) Tuple {
1111
case *List:
1212
return Tuple(x.Items).Copy()
1313
}
14-
panic("SequenceTuple not fully implemented")
14+
panic(ExceptionNewf(TypeError, "SequenceTuple not fully implemented, can't convert %s", v.Type().Name))
1515
}
1616

1717
// Converts a sequence object v into a List
@@ -23,5 +23,5 @@ func SequenceList(v Object) *List {
2323
case *List:
2424
return x.Copy()
2525
}
26-
panic("SequenceList not fully implemented")
26+
panic(ExceptionNewf(TypeError, "SequenceList not fully implemented, can't convert %s", v.Type().Name))
2727
}

0 commit comments

Comments
 (0)
0