Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ set
Function
set
recipes/Python/202234_Assignment_in_expression/recipe-202234.py:2–7 ·
view source on GitHub ↗
(**kw)
Source
from the content-addressed store, hash-verified
1
import
sys
2
def
set(**kw):
3
assert len(kw)==1
4
5
a = sys._getframe(1)
6
a.f_locals.update(kw)
7
return
kw.values()[0]
8
9
#
10
# sample
Callers
5
recipe-202234.py
File · 0.70
skip_redundant
Function · 0.50
remove_redundant
Function · 0.50
__setattr__
Method · 0.50
set_attr
Function · 0.50
Calls
2
update
Method · 0.45
values
Method · 0.45
Tested by
no test coverage detected