Package pyxmpp :: Module xmppstringprep :: Class LookupTable
[show private | hide private]
[frames | no frames]

Class LookupTable


Class for looking up RFC 3454 tables using a dictionary and/or list of ranges.

Method Summary
  __init__(self, singles, ranges)
Initialize `LookupTable` object.
  lookup(self, c)
Do Unicode character lookup.

Method Details

__init__(self, singles, ranges)
(Constructor)

Initialize `LookupTable` object.

:Parameters:
    - `singles`: dictionary mapping Unicode characters into other Unicode characters.
    - `ranges`: list of ``((start,end),value)`` tuples mapping codes in range (start,end)
      to the value.

lookup(self, c)

Do Unicode character lookup.

:Parameters:
    - `c`: Unicode character to look up.

:return: the mapped value.

Generated by Epydoc 2.1 on Wed May 31 22:37:03 2006 http://epydoc.sf.net