Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`positioning`.`_sentence`.`_BaseSentence``

class documentation

`class _BaseSentence: (source)`

Known subclasses: `twisted.positioning.nmea.NMEASentence`

View In Hierarchy

A base sentence class for a particular protocol.

Using this base class, specific sentence classes can almost automatically be created for a particular protocol. To do this, fill the ALLOWED_ATTRIBUTES class attribute using the `getSentenceAttributes` class method of the producer:

        class FooSentence(BaseSentence):
            """
            A sentence for integalactic transmodulator sentences.

            @ivar transmogrificationConstant: The value used in the
                transmogrifier while producing this sentence, corrected for
                gravitational fields.
            @type transmogrificationConstant: C{Tummy}
            """
            ALLOWED_ATTRIBUTES = FooProtocol.getSentenceAttributes()

Method | `__getattr__` | Gets an attribute of this sentence.
Method | `__init__` | Initializes a sentence with parsed sentence data.
Method | `__repr__` | Returns a textual representation of this sentence.
Constant | `ALLOWED_ATTRIBUTES` | A set of attributes that are allowed in this sentence.
Property | `presentAttributes` | An iterable containing the names of the attributes that are present in this sentence.
Instance Variable | `_sentenceData` | Undocumented

def __getattr__(self, name): (source)

Gets an attribute of this sentence.

def __init__(self, sentenceData): (source)

Initializes a sentence with parsed sentence data.

Parameters
sentenceData:`dict` (`str` -> `str` or `None`) | The parsed sentence data.

def __repr__(self): (source)

Returns a textual representation of this sentence.

Returns
`str` | A textual representation of this sentence.

ALLOWED_ATTRIBUTES: `set` of `str` = (source)
overridden in `twisted.positioning.nmea.NMEASentence`

A set of attributes that are allowed in this sentence.

Value

    set()

@property
presentAttributes: iterable of `str` = (source)

An iterable containing the names of the attributes that are present in this sentence.

_sentenceData = (source)

Undocumented