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`.`base`.`Angle``

class documentation

`class Angle(FancyEqMixin): (source)`

Known subclasses: `twisted.positioning.base.Coordinate`, `twisted.positioning.base.Heading`

Constructor: `Angle(angle, angleType)`

View In Hierarchy

An object representing an angle.

Method | `__float__` | Returns this angle as a float.
Method | `__init__` | Initializes an angle.
Method | `__repr__` | Returns a string representation of this angle.
Method | `setSign` | Sets the sign of this angle.
Class Variable | `compareAttributes` | Undocumented
Instance Variable | `angleType` | Undocumented
Property | `inDecimalDegrees` | The value of this angle in decimal degrees. This value is immutable.
Property | `inDegreesMinutesSeconds` | The value of this angle as a degrees, minutes, seconds tuple. This value is immutable.
Constant | `_ANGLE_TYPE_NAMES` | English names for angle types.
Constant | `_RANGE_EXPRESSIONS` | A collection of expressions for the allowable range for the angular value of a particular coordinate value.
Instance Variable | `_angle` | Undocumented
Property | `_angleTypeNameRepr` | Returns a string representation of the type of this angle.
Property | `_angleValueRepr` | Returns a string representation of the angular value of this angle.

Inherited from `FancyEqMixin`:

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

def __float__(self): (source)

Returns this angle as a float.

Returns
`float` | The float value of this angle, expressed in degrees.

def __init__(self, angle=None, angleType=None): (source)
overridden in `twisted.positioning.base.Coordinate`, `twisted.positioning.base.Heading`

Initializes an angle.

Parameters
angle:`float` or `None` | The value of the angle in decimal degrees. (`None` if unknown).
angleType | A symbolic constant describing the angle type. Should be one of `Angles` or {None} if unknown.
Raises
`ValueError` | If the angle type is not the default argument, but it is an unknown type (not in `Angle._RANGE_EXPRESSIONS`), or it is a known type but the supplied value was out of the allowable range for said type.

def __repr__(self) -> `str`: (source)
overridden in `twisted.positioning.base.Heading`

Returns a string representation of this angle.

Returns
`str` | The string representation.

def setSign(self, sign): (source)
overridden in `twisted.positioning.base.Heading`

Sets the sign of this angle.

Parameters
sign:`int` | The new sign. `1` for positive and `-1` for negative signs, respectively.
Raises
`ValueError` | If the `sign` parameter is not `-1` or `1`.

compareAttributes: `ClassVar[Sequence[str]]` = (source)
overrides `twisted.python.util.FancyEqMixin.compareAttributes`
overridden in `twisted.positioning.base.Heading`

Undocumented

angleType = (source)

Undocumented

@property
inDecimalDegrees: `float` (or `None`) = (source)

The value of this angle in decimal degrees. This value is immutable.

@property
inDegreesMinutesSeconds: 3-`tuple` of `int` (or `None`) = (source)

The value of this angle as a degrees, minutes, seconds tuple. This value is immutable.

_ANGLE_TYPE_NAMES: `dict` of `Angles` constants to `str` = (source)

English names for angle types.

Value

    {Angles.LATITUDE: 'Latitude',
     Angles.LONGITUDE: 'Longitude',
     Angles.VARIATION: 'Variation',
     Angles.HEADING: 'Heading'}

_RANGE_EXPRESSIONS: `dict` of `Angles` constants to callables = (source)

A collection of expressions for the allowable range for the angular value of a particular coordinate value.

Value

    {Angles.LATITUDE: (lambda latitude: -90.0 < latitude < 90.0),
     Angles.LONGITUDE: (lambda longitude: -180.0 < longitude < 180.0),
     Angles.HEADING: (lambda heading: 0 <= heading < 360),
     Angles.VARIATION: (lambda variation: -180 < variation <= 180)}

_angle = (source)

Undocumented

@property
_angleTypeNameRepr: `str` = (source)

Returns a string representation of the type of this angle.

This is a helper function for the actual `__repr__`.

@property
_angleValueRepr: `str` = (source)

Returns a string representation of the angular value of this angle.

This is a helper function for the actual `__repr__`.