Undocumented
Method retrieve Retrieve the given key from the given dictionary, removing it if found.
Method fromStringProto Convert a string to a Python value.
Method toBox Populate an 'out' AmpBox with strings encoded from an 'in' dictionary mapping names to Python values.

Inherited from Argument:

Method __init__ Create an Argument.
Method fromBox Populate an 'out' dictionary with mapping names to Python values decoded from an 'in' AmpBox mapping strings to string values.
Method toStringProto Convert a Python object to a string.
Method fromString Convert a string to a Python object. Subclasses must implement this.
Method toString Convert a Python object into a string for passing over the network.
def retrieve(self, d, name, proto):

Retrieve the given key from the given dictionary, removing it if found.

Parametersda dictionary.
namea key in d.
protoan instance of an AMP.
Returnsd[name].
RaisesKeyErrorif I am not optional and no value was found.
def fromStringProto(self, notAString, proto):

Convert a string to a Python value.

ParametersinStringthe string to convert. (type: bytes)
protothe protocol we are converting for. (type: AMP)
Returnsa Python object.
def toBox(self, name, strings, objects, proto):

Populate an 'out' AmpBox with strings encoded from an 'in' dictionary mapping names to Python values.

Parametersnamethe argument name to retrieve (type: bytes)
stringsThe AmpBox to write string(s) to, a mapping of argument names to string values. (type: AmpBox)
objectsThe dictionary to read object(s) from, a mapping of names to Python objects. Keys should be native strings. (type: dict)
protothe protocol we are converting for. (type: AMP)
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.