MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / del_attribute

Function del_attribute

lib/sqlalchemy/orm/attributes.py:2812–2823  ·  view source on GitHub ↗

Delete the value of an attribute, firing history events. This function may be used regardless of instrumentation applied directly to the class, i.e. no descriptors are required. Custom attribute management schemes will need to make usage of this method to establish attribute state a

(instance: object, key: str)

Source from the content-addressed store, hash-verified

2810
2811
2812def del_attribute(instance: object, key: str) -> None:
2813 """Delete the value of an attribute, firing history events.
2814
2815 This function may be used regardless of instrumentation
2816 applied directly to the class, i.e. no descriptors are required.
2817 Custom attribute management schemes will need to make usage
2818 of this method to establish attribute state as understood
2819 by SQLAlchemy.
2820
2821 """
2822 state, dict_ = instance_state(instance), instance_dict(instance)
2823 state.manager[key].impl.delete(state, dict_)
2824
2825
2826def flag_modified(instance: object, key: str) -> None:

Callers 2

__delattr__Method · 0.90
__delattr__Method · 0.90

Calls 3

instance_stateFunction · 0.85
instance_dictFunction · 0.85
deleteMethod · 0.45

Tested by 1

__delattr__Method · 0.72