#!/usr/bin/env python3
-class bidict(dict):
+# © Copyright 2021-2022, Scott Gasch
+
+"""Bidirectional Dictionary."""
+
+
+class BiDict(dict):
def __init__(self, *args, **kwargs):
"""
A class that stores both a Mapping between keys and values and
is possible to have several keys with the same value, using
the inverse map returns a sequence of keys.
- >>> d = bidict()
+ >>> d = BiDict()
>>> d['a'] = 1
>>> d['b'] = 2
>>> d['c'] = 2
if __name__ == '__main__':
import doctest
+
doctest.testmod()