Version: 8.3.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
diclookup.Lookup Class Reference

a dictionary which can lookup value by key, or keys by value More...

Inheritance diagram for diclookup.Lookup:
Inheritance graph

Public Member Functions

def __init__
 items can be a list of pair_lists or a dictionary More...
 
def get_keys
 find the key(s) as a list given a value More...
 
def get_key
 find the key associated to the given a value. More...
 
def get_value
 find the value given a key More...
 

Detailed Description

a dictionary which can lookup value by key, or keys by value

Constructor & Destructor Documentation

def diclookup.Lookup.__init__ (   self,
  items = None 
)

items can be a list of pair_lists or a dictionary

Member Function Documentation

def diclookup.Lookup.get_keys (   self,
  value 
)

find the key(s) as a list given a value

def diclookup.Lookup.get_key (   self,
  value 
)

find the key associated to the given a value.

If several keys exist, only the first is given. To get the whole list, use get_keys instead.

def diclookup.Lookup.get_value (   self,
  key 
)

find the value given a key