MCPcopy
hub / github.com/openai/openai-python / has_more_than_n_keys

Function has_more_than_n_keys

src/openai/lib/_pydantic.py:149–155  ·  view source on GitHub ↗
(obj: dict[str, object], n: int)

Source from the content-addressed store, hash-verified

147
148
149def has_more_than_n_keys(obj: dict[str, object], n: int) -> bool:
150 i = 0
151 for _ in obj.keys():
152 i += 1
153 if i > n:
154 return True
155 return False

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected