Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
+ [PyMultiDict, PyCIMultiDict],
ids=(["MultiDict", "CIMultiDict"] if USE_CYTHON else [])
+ ["PyMultiDict", "PyCIMultiDict"],
)
def cls(request):
return request.param
def copy(self):
"""Return a copy of itself."""
return MultiDict(self.items())
else:
self._impl._items.append((identity, key, value))
self._impl.incr_version()
return
# remove all tail items
i = rgt + 1
while i < len(items):
item = items[i]
if item[0] == identity:
del items[i]
else:
i += 1
class CIMultiDict(MultiDict):
"""Dictionary with the support for duplicate case-insensitive keys."""
def _title(self, key):
return key.title()
class _Iter:
__slots__ = ("_size", "_iter")
def __init__(self, size, iterator):
self._size = size
self._iter = iterator
def __iter__(self):
return self