Is there a 'multimap' implementation in Python?

后端 未结 8 1635
离开以前
离开以前 2020-12-01 01:26

I am new to Python, and I am familiar with implementations of Multimaps in other languages. Does Python have such a data structure built-in, or available in a commonly-used

8条回答
  •  盖世英雄少女心
    2020-12-01 01:33

    There is no multi-map in the Python standard libs currently.

    WebOb has a MultiDict class used to represent HTML form values, and it is used by a few Python Web frameworks, so the implementation is battle tested.

    Werkzeug also has a MultiDict class, and for the same reason.

提交回复
热议问题