aio-libs / aio-libs/multidict

Enhancement: `to_dict` method

未关闭
#783 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
492
派生
129
平均合并
14 小时 28 分钟
30 天内合并 PR
35

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。