sob/model.py
def _copy_init(self, other: abc.Object) -> None:
        """
        Initialize this object from another `Object` (copy constructor)
        """
        other_meta: Optional[abc.ObjectMeta] = meta.object_read(other)
        if meta.object_read(self) is not other_meta:
            meta.write(self, deepcopy(other_meta))
        instance_hooks: Optional[abc.ObjectHooks] = hooks.object_read(other)
        if hooks.object_read(self) is not instance_hooks:
            hooks.write(self, deepcopy(instance_hooks))
        if other_meta and other_meta.properties:
            for property_name_ in other_meta.properties.keys():
                try:
                    setattr(
                        self, property_name_, getattr(other, property_name_)
                    )
                except TypeError as error:
                    label = "\n - %s.%s: " % (
                        qualified_name(type(self)),
                        property_name_,
                    )
                    if error.args:
                        error.args = tuple(
                            chain((label + error.args[0],), error.args[1:])
                        )
                    else:
                        error.args = (label + serialize(other),)
                    raise error
            meta.url(self, meta.url(other))
            meta.pointer(self, meta.pointer(other))
            meta.format_(self, meta.format_(other))

        Initialize this object from another `Object` (copy constructor)
        
Initialize this object from another `Object` (copy constructor)
Initialize this object from another ` Object ` ( copy constructor )
def _copy_init(self, other: abc.Object) -> None:
        other_meta: Optional[abc.ObjectMeta] = meta.object_read(other)
        if meta.object_read(self) is not other_meta:
            meta.write(self, deepcopy(other_meta))
        instance_hooks: Optional[abc.ObjectHooks] = hooks.object_read(other)
        if hooks.object_read(self) is not instance_hooks:
            hooks.write(self, deepcopy(instance_hooks))
        if other_meta and other_meta.properties:
            for property_name_ in other_meta.properties.keys():
                try:
                    setattr(
                        self, property_name_, getattr(other, property_name_)
                    )
                except TypeError as error:
                    label = "\n - %s.%s: " % (
                        qualified_name(type(self)),
                        property_name_,
                    )
                    if error.args:
                        error.args = tuple(
                            chain((label + error.args[0],), error.args[1:])
                        )
                    else:
                        error.args = (label + serialize(other),)
                    raise error
            meta.url(self, meta.url(other))
            meta.pointer(self, meta.pointer(other))
            meta.format_(self, meta.format_(other))
def _copy_init ( self , other : abc . Object ) -> None : other_meta : Optional [ abc . ObjectMeta ] = meta . object_read ( other ) if meta . object_read ( self ) is not other_meta : meta . write ( self , deepcopy ( other_meta ) ) instance_hooks : Optional [ abc . ObjectHooks ] = hooks . object_read ( other ) if hooks . object_read ( self ) is not instance_hooks : hooks . write ( self , deepcopy ( instance_hooks ) ) if other_meta and other_meta . properties : for property_name_ in other_meta . properties . keys ( ) : try : setattr ( self , property_name_ , getattr ( other , property_name_ ) ) except TypeError as error : label = "\n - %s.%s: " % ( qualified_name ( type ( self ) ) , property_name_ , ) if error . args : error . args = tuple ( chain ( ( label + error . args [ 0 ] , ) , error . args [ 1 : ] ) ) else : error . args = ( label + serialize ( other ) , ) raise error meta . url ( self , meta . url ( other ) ) meta . pointer ( self , meta . pointer ( other ) ) meta . format_ ( self , meta . format_ ( other ) )
Initialize this object from another `Object` (copy constructor)
Initialize this object from another ` Object ` ( copy constructor )
"""
        Initialize this object from another `Object` (copy constructor)
        """
self
other
abc.Object