aio-libs / aio-libs/multidict

Enhancement: `to_dict` method

Open
#783 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
492
Forks
129
Avg merge
14h 28m
Merged PRs (30d)
35

Description

Hi there,

Thanks for this library. I'd like to ask for a convenience method that output a dict of a multidict - with lists for multi-values. Currently I have this:

```python
def dict(self) -> Dict[str, List[Any]]:
"""

Returns:
A dict of lists
"""
return {k: self.getall(k) for k in set(self.keys)}
```

While this works, its not very performant.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.