class documentation

class token(_unicode):

Known subclasses: lxml.html.diff.href_token, lxml.html.diff.tag_token

View In Hierarchy

Represents a diffable token, generally a word that is displayed to the user. Opening tags are attached to this token when they are adjacent (pre_tags) and closing tags that follow the word (post_tags). Some exceptions occur when there are empty tags adjacent to a word, so there may be close tags in pre_tags, or open tags in post_tags.

We also keep track of whether the word was originally followed by whitespace, even though we do not want to treat the word as equivalent to a similar word that does not have a trailing space.

Method __new__ Undocumented
Method __repr__ Undocumented
Method html Undocumented
Class Variable hide​_when​_equal Undocumented
def __new__(cls, text, pre_tags=None, post_tags=None, trailing_whitespace=''):

Undocumented

def __repr__(self):

Undocumented

def html(self):
hide_when_equal: bool =

Undocumented