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`.`python`.`modules`.`PythonAttribute``

class documentation

`class PythonAttribute: (source)`

Constructor: `PythonAttribute(name, onObject, loaded, pythonValue)`

View In Hierarchy

I represent a function, class, or other object that is present.

Method | `__init__` | Create a PythonAttribute. This is a private constructor. Do not construct me directly, use PythonModule.iterAttributes.
Method | `__repr__` | Undocumented
Method | `isLoaded` | Return a boolean describing whether the attribute this describes has actually been loaded into memory by importing its module.
Method | `iterAttributes` | Undocumented
Method | `load` | Load the value associated with this attribute.
Instance Variable | `name` | the fully qualified python name of the attribute represented by this class.
Instance Variable | `onObject` | a reference to a PythonModule or other PythonAttribute that is this attribute's logical parent.
Instance Variable | `pythonValue` | Undocumented
Instance Variable | `_loaded` | Undocumented

def __init__(self, name: `str`, onObject: `PythonAttribute`, loaded: `bool`, pythonValue: `object`): (source)

Create a PythonAttribute. This is a private constructor. Do not construct me directly, use PythonModule.iterAttributes.

Parameters
name:`str` | the FQPN
onObject:`PythonAttribute` | see ivar
loaded:`bool` | always True, for now
pythonValue:`object` | the value of the attribute we're pointing to.

def __repr__(self) -> `str`: (source)

Undocumented

def isLoaded(self): (source)

Return a boolean describing whether the attribute this describes has actually been loaded into memory by importing its module.

Note: this currently always returns true; there is no Python parser support in this module yet.

def iterAttributes(self): (source)

Undocumented

def load(self, default=_nothing): (source)

Load the value associated with this attribute.

Returns
an arbitrary Python object, or 'default' if there is an error loading it.

name: `str` = (source)

the fully qualified python name of the attribute represented by this class.

onObject = (source)

a reference to a PythonModule or other PythonAttribute that is this attribute's logical parent.

pythonValue = (source)

Undocumented

_loaded = (source)

Undocumented