pg.load¶
Accessible via pg.load
, pg.symbolic.load
.
- load(path, *args, **kwargs)[source]¶
Load a symbolic value using the global load handler.
Example:
@pg.members([ ('x', pg.typing.Any()) ]) class A(pg.Object): pass a1 = A(1) file = 'my_file.json' a1.save(file) a2 = pg.load(file) assert pg.eq(a1, a2)
- Return type:
- Parameters:
path – A path string for loading an object.
*args – Positional arguments that will be passed through to the global load handler.
**kwargs – Keyword arguments that will be passed through to the global load handler.
- Returns:
Return value from the global load handler.