Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/sqlalchemy/sqlalchemy
/ attrsetter
Function
attrsetter
lib/sqlalchemy/util/langhelpers.py:2035–2039 ·
view source on GitHub ↗
(attrname)
Source
from the content-addressed store, hash-verified
2033
2034
2035
def
attrsetter(attrname):
2036
code =
"def set(obj, value): obj.%s = value"
% attrname
2037
env = locals().copy()
2038
exec(code, env)
2039
return
env[
"set"
]
2040
2041
2042
dunders_re = re.compile(
"^__.+__$"
)
Callers
nothing calls this directly
Calls
2
locals
Function · 0.85
copy
Method · 0.45
Tested by
no test coverage detected