MCPcopy
hub / github.com/marshmallow-code/marshmallow / is_sequence_but_not_string

Function is_sequence_but_not_string

src/marshmallow/utils.py:23–25  ·  view source on GitHub ↗

Return True if ``obj`` is a sequence that isn't a string.

(obj)

Source from the content-addressed store, hash-verified

21
22
23def is_sequence_but_not_string(obj) -> typing.TypeGuard[Sequence]:
24 """Return True if ``obj`` is a sequence that isn't a string."""
25 return isinstance(obj, Sequence) and not isinstance(obj, (str, bytes))
26
27
28def is_collection(obj) -> typing.TypeGuard[typing.Iterable]:

Callers 1

_deserializeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…