ATLAS Offline Software
ActsUtilities.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
4  prefix: str,
5  **kwargs: dict) -> dict:
6  """ Extract subset of kwargs with common prefix """
7  assert isinstance(kwargs, dict)
8  assert isinstance(prefix, str)
9 
10  args = dict()
11  for (k,v) in kwargs.items():
12  if len(k) <= len(prefix):
13  continue
14  if k[:len(prefix)] != prefix:
15  continue
16  args[ k[len(prefix):] ] = v
17  return args
ActsUtilities.extractChildKwargs
dict extractChildKwargs(*str prefix, **dict kwargs)
Definition: ActsUtilities.py:3