Jonathan Fine:
> A google search for biject.py and bijection.py
> produced no hits, so I suspect that this may not
> have been done before.

There are few (good too) implementations around, but they are called
bidict or bidirectional dicts. Sometimes I use this implementation,
with few changes:
http://www.radlogic.com.au/releases/two_way_dict.py

Bye,
bearophile

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to