Flipdict -- python dict that also maintains a one-to-one inverse mapping

Category: Python - Miscellaneous

A Flipdict is a python dict subclass that maintains a one-to-one inverse mapping. Each key maps to a unique value, and each value maps back to that same key. Each instance has a "flip" attribute to access the inverse mapping. Date: 15 March, 2012


1 To 1 - Bijection - Bijective - DICT - Injection - Injective - Inverse - Invert - Mapping - One To One

Homepage: http://code.activestate.com/recipes/576968-flipdict-python-dict-that-also-maintains-a-one-to-/?in=lang-python

Developer: Francis Carr

License: Freeware

Operating System: Windows

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

Ruby/DICT is an RFC 2229 compliant client-side library implementation of the DICT protocol, written in the Ruby programming language.

developer Developer: caliban.org
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


This is an implementation of an easy to use unrestricted grammar.

developer Developer: Shea Kauffman
license License: Freeware
operating systems Operating System: Windows


Think of this as a JavaScript object.

developer Developer: Sunjay Varma
license License: Freeware
operating systems Operating System: Windows


It's a dictionary that's restricted to a tuple of allowed keys.

developer Developer: arnoques
license License: Freeware
operating systems Operating System: Windows


"Namespaces are one honking great idea -- let's do more of those.

developer Developer: Eric Snow
license License: Freeware
operating systems Operating System: Windows


An implementation of dictionaries preserving key insertion order.

developer Developer: Lucio Santi
license License: Freeware
operating systems Operating System: Windows


Set-like operations for dictionaries.

developer Developer: thom neale
license License: Freeware
operating systems Operating System: Windows


In Recipe 576954 presented a numerical method for pricing Asian options using mpmath and some code from Recipe 576938: Numerical Inversion of the Laplace Transform with mpmath.

developer Developer: Dieter Kadelka
license License: Freeware
operating systems Operating System: Windows


CGI script getting JSON for SQL request.

developer Developer: Martchenko
license License: Freeware
operating systems Operating System: Windows