Skip to content
Snippets Groups Projects

GaudiConfig2: add clone for Configurable

Merged Frank Winklmeier requested to merge fwinkl/Gaudi:confclone into master
2 files
+ 21
3
Compare changes
  • Side-by-side
  • Inline
Files
2
#####################################################################################
# (c) Copyright 1998-2022 CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
@@ -273,6 +273,10 @@ class Configurable(ConfigMetaHelper):
def getDefaultProperty(cls, name):
return cls._descriptors[name].default
def clone(self, newname=None):
"""Clone instance with all its properties."""
return self.__class__(newname, **self._properties)
def merge(self, other):
"""
Merge the properties of the other instance into the current one.
Loading