Romanizations

For general information about romanizations and registries, see Romanization.

Registry

A Registry is a specialization of Directory that contains Romanizations. The following methods are useful:

new_child(name)
Create a new Romanization.
__getitem__(name)
Returns an existing Romanization. Returns a Romanization file. If the directory contains a file with the given name, it is returned, and otherwise, if there is a "standard" romanization with the given name, it is returned, wrapped in the ReadOnlyRomanization class.
__contains__(name)
True if there is a file in the directory or a standard romanization with the given name.
__iter__()
Iterates only over the files that are actually in the directory.

Romanization

A Romanization is a mapping from 7-bit ASCII strings to Unicode strings.

decode(b)
Returns the decoding of the byte-sequence b.
decoder()
Returns a decoder. (The decode method creates a new one each time it is called.)
romanization()
Returns the romanization itself; the file contents.
__setitem__(k,v)
Modifies the mapping.

A ReadOnlyRomanization behaves the same, except that it signals an error if one tries to set an entry.