Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ _replace
Method
_replace
example_code/item_056.py:223–231 ·
view source on GitHub ↗
(self, **overrides)
Source
from the content-addressed store, hash-verified
221
222
223
def
_replace(self, **overrides):
224
fields = dict(
225
name=self.name,
226
x=self.x,
227
y=self.y,
228
)
229
fields.update(overrides)
230
cls = type(self)
231
return
cls(**fields)
232
233
234
print(
"Example 18"
)
Callers
1
translate_replace
Function · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected