MCPcopy
hub / github.com/pallets/werkzeug / popitem

Method popitem

src/werkzeug/datastructures/structures.py:787–799  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

785 return buckets[0].value
786
787 def popitem(self) -> tuple[K, V]:
788 key: K
789 buckets: list[_omd_bucket[K, V]]
790
791 try:
792 key, buckets = dict.popitem(self) # type: ignore[arg-type]
793 except KeyError as e:
794 raise exceptions.BadRequestKeyError(e.args[0]) from None
795
796 for bucket in buckets:
797 bucket.unlink(self)
798
799 return key, buckets[0].value
800
801 def popitemlist(self) -> tuple[K, list[V]]:
802 key: K

Callers

nothing calls this directly

Calls 2

unlinkMethod · 0.80
popitemMethod · 0.45

Tested by

no test coverage detected