class documentation
class CaseInsensitiveOrderedMultiDict(MutableMapping[
Constructor: CaseInsensitiveOrderedMultiDict(default_factory)
A case-insensitive ordered dictionary that can store multiple values per key.
This class maintains the order of insertions and allows multiple values for the same key. Keys are compared case-insensitively.
| Class Method | make |
Create a CaseInsensitiveOrderedMultiDict from an existing mapping. |
| Method | __delitem__ |
Delete all values for a key. |
| Method | __getitem__ |
Get the last value for a key. |
| Method | __init__ |
Initialize a CaseInsensitiveOrderedMultiDict. |
| Method | __iter__ |
Iterate over the dictionary's keys. |
| Method | __len__ |
Return the number of unique keys in the dictionary. |
| Method | __setitem__ |
Set a value for a key, appending to existing values. |
| Method | get |
Get the last value for a key, or a default if not found. |
| Method | get |
Get all values for a key in insertion order. |
| Method | items |
Return a view of the dictionary's (key, value) pairs in insertion order. |
| Method | keys |
Return a view of the dictionary's keys. |
| Method | set |
Set a value for a key, replacing all existing values. |
| Method | setdefault |
Get value for key, setting it to default if not present. |
| Method | values |
Return a view of the dictionary's values. |
| Instance Variable | _default |
Undocumented |
| Instance Variable | _keyed |
Undocumented |
| Instance Variable | _real |
Undocumented |
def make(cls, dict_in:
MutableMapping[ K, V] | CaseInsensitiveOrderedMultiDict[ K, V] | None = None, default_factory: Callable[ [], V] | None = None) -> CaseInsensitiveOrderedMultiDict[ K, V]:
¶
Create a CaseInsensitiveOrderedMultiDict from an existing mapping.
| Parameters | |
dictMutableMapping[ | Optional mapping to initialize from |
defaultCallable[ | Optional factory function for default values |
| Returns | |
CaseInsensitiveOrderedMultiDict[ | New CaseInsensitiveOrderedMultiDict instance |
| Raises | |
TypeError | If dict_in is not a mapping or None |