twisted.test.test_amp.TransportPeer(amp.Argument)
class documentationtwisted.test.test_amp
(View In Hierarchy)
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. |
Retrieve the given key from the given dictionary, removing it if found.
Parameters | d | a dictionary. |
name | a key in d. | |
proto | an instance of an AMP. | |
Returns | d[name]. | |
Raises | KeyError | if I am not optional and no value was found. |
Convert a string to a Python value.
Parameters | inString | the string to convert. (type: bytes ) |
proto | the protocol we are converting for. (type: AMP) | |
Returns | a Python object. |
Populate an 'out' AmpBox with strings encoded from an 'in' dictionary mapping names to Python values.
Parameters | name | the argument name to retrieve (type: bytes ) |
strings | The AmpBox to write string(s) to, a mapping of argument names to string values. (type: AmpBox) | |
objects | The dictionary to read object(s) from, a mapping of names to Python objects. Keys should be native strings. (type: dict) | |
proto | the protocol we are converting for. (type: AMP) |