syft.ast.static_attr¶
This module contains StaticAttribute, an AST node representing a method, function, or constructor which can be directly executed.
Classes
|
A method, function, or constructor which can be directly executed. |
- class syft.ast.static_attr.StaticAttribute(parent, path_and_name, return_type_name=None, client=None)[source]¶
Bases:
syft.ast.attribute.Attribute
A method, function, or constructor which can be directly executed.
- __init__(parent, path_and_name, return_type_name=None, client=None)[source]¶
Base constructor.
- Parameters
parent – The parent node is needed.
path_and_name – The path for the current node, e.g. syft.lib.python.List.
return_type_name – The return type name of given action as a string with it’s full path.
client – The client for which all computation is being executed.
- get_remote_value()[source]¶
Remote execution is performed when AST is constructed with a client.
The get_remote_value method triggers GetSetStaticAttributeAction on the AST.
- Returns
Pointer to remote value.
- Return type
- solve_get_value()[source]¶
Local execution of the getter function is performed.
The solve_get_value method executes the getter function on the AST.
- Raises
ValueError – If path_and_name is None.
- Returns
Value of the AST node
- solve_set_value(set_value)[source]¶
Local execution of setter function is performed.
The solve_set_value method executes the setter function on the AST.
- Parameters
set_value – The value to set to.
- Raises
ValueError – If path_and_name is None.
- set_remote_value(set_arg)[source]¶
Remote execution of setter function is performed when AST is constructed with a client.
The set_remote_value method triggers GetSetStaticAttributeAction on the AST.
- Parameters
set_arg – The value to set to.
- Raises
ValueError – If client is None or path_and_name is None.
- Returns
Pointer to the object