Package lepl :: Package regexp :: Module binary :: Class BinaryAlphabet
[hide private]
[frames] | no frames]

Class BinaryAlphabet

source code


An alphabet for binary strings.
Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
before(self, char)
Must return the character before c in the alphabet.
source code
 
after(self, char)
Must return the character after c in the alphabet.
source code
 
from_char(self, char)
Convert to 0 or 1.
source code

Inherited from str.StrAlphabet: escape, escaped, fmt_choice, fmt_intervals, fmt_label, fmt_option, fmt_repeat, fmt_sequence, illegal, join, parse, range

Inherited from str.StrAlphabet (private): _escape_char, _no_parens

Inherited from core.Alphabet: extension, invert, max, min

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

before(self, char)

source code 
Must return the character before c in the alphabet. Never called with min (assuming input data are in range).
Overrides: core.Alphabet.before

after(self, char)

source code 
Must return the character after c in the alphabet. Never called with max (assuming input data are in range).
Overrides: core.Alphabet.after

from_char(self, char)

source code 
Convert to 0 or 1.
Overrides: str.StrAlphabet.from_char