weldx.WeldxFile.pop#
- WeldxFile.pop(key, default=None)#
Get and remove the given key from the file.
- Parameters
key – key name
default – object to return in case key is not present in the file.
- Returns
the object value of given key. If key was not found, return the default.
- Return type
Examples
Let us remove and store some data from a weldx file. >>> a = WeldxFile(tree=dict(x=42, y=0), mode=”rw”) >>> x = a.pop(“x”) >>> x 42 >>> “x” not in a.keys() True