parameters: (self, **kwargs)
docstring: Initialize HTMLSerializer
  
          :arg inject_meta_charset: Whether or not to inject the meta charset.
  
              Defaults to ``True``.
  
          :arg quote_attr_values: Whether to quote attribute values that don't
              require quoting per legacy browser behavior (``"legacy"``), when
              required by the standard (``"spec"``), or always (``"always"``).
  
              Defaults to ``"legacy"``.
  
          :arg quote_char: Use given quote character for attribute quoting.
  
              Defaults to ``"`` which will use double quotes unless attribute
              value contains a double quote, in which case single quotes are
              used.
  
          :arg escape_lt_in_attrs: Whether or not to escape ``<`` in attribute
              values.
  
              Defaults to ``False``.
  
          :arg escape_rcdata: Whether to escape characters that need to be
              escaped within normal elements within rcdata elements such as
              style.
  
              Defaults to ``False``.
  
          :arg resolve_entities: Whether to resolve named character entities that
              appear in the source tree. The XML predefined entities &lt; &gt;
              &amp; &quot; &apos; are unaffected by this setting.
  
              Defaults to ``True``.
  
          :arg strip_whitespace: Whether to remove semantically meaningless
              whitespace. (This compresses all whitespace to a single space
              except within ``pre``.)
  
              Defaults to ``False``.
  
          :arg minimize_boolean_attributes: Shortens boolean attributes to give
              just the attribute value, for example::
  
                <input disabled="disabled">
  
              becomes::
  
                <input disabled>
  
              Defaults to ``True``.
  
          :arg use_trailing_solidus: Includes a close-tag slash at the end of the
              start tag of void elements (empty elements whose end tag is
              forbidden). E.g. ``<hr/>``.
  
              Defaults to ``False``.
  
          :arg space_before_trailing_solidus: Places a space immediately before
              the closing slash in a tag using a trailing solidus. E.g.
              ``<hr />``. Requires ``use_trailing_solidus=True``.
  
              Defaults to ``True``.
  
          :arg sanitize: Strip all unsafe or unknown constructs from output.
              See :py:class:`html5lib.filters.sanitizer.Filter`.
  
              Defaults to ``False``.
  
          :arg omit_optional_tags: Omit start/end tags that are optional.
  
              Defaults to ``True``.
  
          :arg alphabetical_attributes: Reorder attributes to be in alphabetical order.
  
              Defaults to ``False``.
docstring_summary: Initialize HTMLSerializer
docstring_tokens: Initialize HTMLSerializer
function: def __init__(self, **kwargs):
          """Initialize HTMLSerializer
  
          :arg inject_meta_charset: Whether or not to inject the meta charset.
  
              Defaults to ``True``.
  
          :arg quote_attr_values: Whether to quote attribute values that don't
              require quoting per legacy browser behavior (``"legacy"``), when
              required by the standard (``"spec"``), or always (``"always"``).
  
              Defaults to ``"legacy"``.
  
          :arg quote_char: Use given quote character for attribute quoting.
  
              Defaults to ``"`` which will use double quotes unless attribute
              value contains a double quote, in which case single quotes are
              used.
  
          :arg escape_lt_in_attrs: Whether or not to escape ``<`` in attribute
              values.
  
              Defaults to ``False``.
  
          :arg escape_rcdata: Whether to escape characters that need to be
              escaped within normal elements within rcdata elements such as
              style.
  
              Defaults to ``False``.
  
          :arg resolve_entities: Whether to resolve named character entities that
              appear in the source tree. The XML predefined entities &lt; &gt;
              &amp; &quot; &apos; are unaffected by this setting.
  
              Defaults to ``True``.
  
          :arg strip_whitespace: Whether to remove semantically meaningless
              whitespace. (This compresses all whitespace to a single space
              except within ``pre``.)
  
              Defaults to ``False``.
  
          :arg minimize_boolean_attributes: Shortens boolean attributes to give
              just the attribute value, for example::
  
                <input disabled="disabled">
  
              becomes::
  
                <input disabled>
  
              Defaults to ``True``.
  
          :arg use_trailing_solidus: Includes a close-tag slash at the end of the
              start tag of void elements (empty elements whose end tag is
              forbidden). E.g. ``<hr/>``.
  
              Defaults to ``False``.
  
          :arg space_before_trailing_solidus: Places a space immediately before
              the closing slash in a tag using a trailing solidus. E.g.
              ``<hr />``. Requires ``use_trailing_solidus=True``.
  
              Defaults to ``True``.
  
          :arg sanitize: Strip all unsafe or unknown constructs from output.
              See :py:class:`html5lib.filters.sanitizer.Filter`.
  
              Defaults to ``False``.
  
          :arg omit_optional_tags: Omit start/end tags that are optional.
  
              Defaults to ``True``.
  
          :arg alphabetical_attributes: Reorder attributes to be in alphabetical order.
  
              Defaults to ``False``.
  
          """
          unexpected_args = frozenset(kwargs) - frozenset(self.options)
          if len(unexpected_args) > 0:
              raise TypeError("__init__() got an unexpected keyword argument '%s'" % next(iter(unexpected_args)))
          if 'quote_char' in kwargs:
              self.use_best_quote_char = False
          for attr in self.options:
              setattr(self, attr, kwargs.get(attr, getattr(self, attr)))
          self.errors = []
          self.strict = False
function_tokens: def __init__ ( self , * * kwargs ) : unexpected_args = frozenset ( kwargs ) - frozenset ( self . options ) if len ( unexpected_args ) > 0 : raise TypeError ( "__init__() got an unexpected keyword argument '%s'" % next ( iter ( unexpected_args ) ) ) if 'quote_char' in kwargs : self . use_best_quote_char = False for attr in self . options : setattr ( self , attr , kwargs . get ( attr , getattr ( self , attr ) ) ) self . errors = [ ] self . strict = False