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`.`util`.`InsensitiveDict``

class documentation

`class InsensitiveDict(MutableMapping): (source)`

View In Hierarchy

Dictionary, that has case-insensitive keys.

Normally keys are retained in their original form when queried with .keys() or .items(). If initialized with preserveCase=0, keys are both looked up in lowercase and returned in lowercase by .keys() and .items().

Method | `__delitem__` | Undocumented
Method | `__eq__` | Undocumented
Method | `__getitem__` | Retrieve the value associated with 'key' (in any case).
Method | `__init__` | Create an empty dictionary, or update from 'dict'.
Method | `__len__` | Undocumented
Method | `__repr__` | String representation of the dictionary.
Method | `__setitem__` | Associate 'value' with 'key'. If 'key' already exists, but in different case, it will be replaced.
Method | `clear` | Undocumented
Method | `copy` | Undocumented
Method | `get` | Retrieve value associated with 'key' or return default value if 'key' doesn't exist.
Method | `has_key` | Case insensitive test whether 'key' exists.
Method | `items` | List of (key,value) pairs.
Method | `iteritems` | Undocumented
Method | `iterkeys` | Undocumented
Method | `itervalues` | Undocumented
Method | `keys` | List of keys in their original case.
Method | `pop` | No summary
Method | `popitem` | Undocumented
Method | `setdefault` | If 'key' doesn't exist, associate it with the 'default' value. Return value associated with 'key'.
Method | `update` | Copy (key,value) pairs from 'dict'.
Method | `values` | List of values.
Instance Variable | `data` | Undocumented
Instance Variable | `preserve` | Undocumented
Method | `_doPreserve` | Undocumented
Method | `_lowerOrReturn` | Undocumented
Class Variable | `_notFound` | Undocumented

def __delitem__(self, key): (source)

Undocumented

def __eq__(self, other): (source)

Undocumented

Parameters
other:`object` | Undocumented
Returns
`bool` | Undocumented

def __getitem__(self, key): (source)

Retrieve the value associated with 'key' (in any case).

def __init__(self, dict=None, preserve=1): (source)

Create an empty dictionary, or update from 'dict'.

def __len__(self): (source)

Undocumented

def __repr__(self): (source)

String representation of the dictionary.

Returns
`str` | Undocumented

def __setitem__(self, key, value): (source)

Associate 'value' with 'key'. If 'key' already exists, but in different case, it will be replaced.

def clear(self): (source)

Undocumented

def copy(self): (source)

Undocumented

def get(self, key, default=None): (source)

Retrieve value associated with 'key' or return default value if 'key' doesn't exist.

def has_key(self, key): (source)

Case insensitive test whether 'key' exists.

def items(self): (source)

List of (key,value) pairs.

def iteritems(self): (source)

Undocumented

def iterkeys(self): (source)

Undocumented

def itervalues(self): (source)

Undocumented

def keys(self): (source)

List of keys in their original case.

def pop(self, key, default=_notFound): (source)

See Also
`dict.pop`
Present Since
Twisted 21.2.0

def popitem(self): (source)

Undocumented

def setdefault(self, key, default): (source)

If 'key' doesn't exist, associate it with the 'default' value. Return value associated with 'key'.

def update(self, dict): (source)

Copy (key,value) pairs from 'dict'.

def values(self): (source)

List of values.

data: `dict` = (source)

Undocumented

preserve = (source)

Undocumented

def _doPreserve(self, key): (source)

Undocumented

def _lowerOrReturn(self, key): (source)

Undocumented

_notFound = (source)

Undocumented