Go to the latest version of this document.

# ``twisted`.`python`.`_textattributes`.`_FormattingStateMixin``

class documentation

`class _FormattingStateMixin(DefaultFormattingState): (source)`

Known subclasses: `twisted.conch.insults.helper._FormattingState`, `twisted.words.protocols.irc._FormattingState`

View In Hierarchy

Mixin for the formatting state/attributes of a single character.

Method | `copy` | Make a copy of this formatting state.
Method | `_withAttribute` | Add a character attribute to a copy of this formatting state.

Inherited from `DefaultFormattingState`:

Method | `toVT102` | Emit a VT102 control sequence that will set up all the attributes this formatting state has set.
Class Variable | `compareAttributes` | Undocumented
Class Variable | `_dummy` | Undocumented

Inherited from `FancyEqMixin` (via `DefaultFormattingState`):

Method | `__eq__` | Undocumented
Method | `__ne__` | Undocumented

def copy(self): (source)
overrides `twisted.python._textattributes.DefaultFormattingState.copy`

Make a copy of this formatting state.

Returns
A formatting state instance.

def _withAttribute(self, name, value): (source)
overrides `twisted.python._textattributes.DefaultFormattingState._withAttribute`

Add a character attribute to a copy of this formatting state.

Parameters
name | Attribute name to be added to formatting state.
value | Attribute value.

Returns
A formatting state instance with the new attribute.