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`.`trial`.`_synctest`.`_Warning``

class documentation

`class _Warning: (source)`

Constructor: `_Warning(message, category, filename, lineno)`

View In Hierarchy

A `_Warning` instance represents one warning emitted through the Python warning system (`warnings`). This is used to insulate callers of `_collectWarnings` from changes to the Python warnings system which might otherwise require changes to the warning objects that function passes to the observer object it accepts.

Method | `__init__` | Undocumented
Instance Variable | `category` | The `Warning` subclass which was passed as the category parameter to `warnings.warn`.
Instance Variable | `filename` | The name of the file containing the definition of the code object which was `stacklevel` frames above the call to `warnings.warn`, where `stacklevel` is the value of the `stacklevel` parameter passed to `warnings.warn`...
Instance Variable | `lineno` | The source line associated with the active instruction of the code object object which was `stacklevel` frames above the call to `warnings.warn`, where `stacklevel` is the value of the `stacklevel` parameter passed to ...
Instance Variable | `message` | The string which was passed as the message parameter to `warnings.warn`.

def __init__(self, message, category, filename, lineno): (source)

Undocumented

category = (source)

The `Warning` subclass which was passed as the category parameter to `warnings.warn`.

filename = (source)

The name of the file containing the definition of the code object which was `stacklevel` frames above the call to `warnings.warn`, where `stacklevel` is the value of the `stacklevel` parameter passed to `warnings.warn`.

lineno = (source)

The source line associated with the active instruction of the code object object which was `stacklevel` frames above the call to `warnings.warn`, where `stacklevel` is the value of the `stacklevel` parameter passed to `warnings.warn`.

message = (source)

The string which was passed as the message parameter to `warnings.warn`.