weldx.WeldxFile.fromkeys#

classmethod WeldxFile.fromkeys(iterable, default=None)#

Create a new file with keys from iterable and values set to value.

Parameters:
  • iterable – list of key names

  • default – default value to fill the keys with.

Return type:

WeldxFile

Examples

>>> from collections import defaultdict
>>> wx = WeldxFile.fromkeys(("TCP", "wx_meta", "process"))
>>> wx["TCP"], wx["wx_meta"], wx["process"]
(None, None, None)