dns :: tokenizer :: Token :: Class Token |
[hide private]
[frames] | no frames]

# Class Token

source code

    object --+
             |
            Token

A DNS master file format token.

Instance Methods | [hide private]
__init__(self, ttype, value=`'````'`, has_escape=False) Initialize a token instance. | source code
is_eof(self) | source code
is_eol(self) | source code
is_whitespace(self) | source code
is_identifier(self) | source code
is_quoted_string(self) | source code
is_comment(self) | source code
is_delimiter(self) | source code
is_eol_or_eof(self) | source code
__eq__(self, other) | source code
__ne__(self, other) | source code
__str__(self) str(x) | source code
unescape(self) | source code
__len__(self) | source code
__iter__(self) | source code
__getitem__(self, i) | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Instance Variables | [hide private]
bool | has_escape Does the token value contain escapes?
int | ttype The token type
string | value The token value

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, ttype, value=`'````'`, has_escape=False) (Constructor) | source code
Initialize a token instance. Parameters: `ttype` (int) - The token type `has_escape` (bool) `value` (string) Overrides: object.__init__

### __str__(self) (Informal representation operator) | source code
str(x) Overrides: object.__str__ (inherited documentation)