Skip to content

Commit 495f697

Browse files
committed
BUG: Propagate Python exceptions from c_is_list_like (pandas-dev#33721)
1 parent cf61be6 commit 495f697

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/_libs/lib.pxd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cdef bint c_is_list_like(object, bint)
1+
cdef bint c_is_list_like(object, bint) except -1

pandas/_libs/lib.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ def is_list_like(obj: object, allow_sets: bool = True) -> bool:
985985
return c_is_list_like(obj, allow_sets)
986986

987987

988-
cdef inline bint c_is_list_like(object obj, bint allow_sets):
988+
cdef inline bint c_is_list_like(object obj, bint allow_sets) except -1:
989989
return (
990990
isinstance(obj, abc.Iterable)
991991
# we do not count strings/unicode/bytes as list-like

0 commit comments

Comments
 (0)