def __copy__(self):
        """Copy all the attributes even if __dict__ only returns the pairs
           with non-null values."""
        cls = self.__class__
        result = cls.__new__(cls)
        for key in self.__attrs__:
          val = getattr(self, key)
          setattr(result, key, val if val else None)
        return result
Copy all the attributes even if __dict__ only returns the pairs
           with non-null values.
hpccm/toolchain.py