palgen.machinery.attributes#

Module Contents#

palgen.machinery.attributes.setattr_default(cls, name, default)#
Parameters:
  • cls (type) –

  • name (str) –

  • default (Any) –

palgen.machinery.attributes.T#
palgen.machinery.attributes.copy_attrs(source, target, copy=False, deepcopy=False)#

Copies attributes from one object to another.

Notes

If neither copy nor deepcopy are set this will just update attribute references.

Parameters:
  • source (Any) – The source object from which attributes will be copied.

  • target (Any) – The target object to which attributes will be copied.

  • copy (bool, optional) – Whether to perform a shallow copy. Defaults to False.

  • deepcopy (bool, optional) – Whether to perform a deep copy. Defaults to False.

Return type:

None