MCPcopy Create free account
hub / github.com/ipython/traitlets / __deepcopy__

Method __deepcopy__

traitlets/config/loader.py:317–327  ·  view source on GitHub ↗
(self, memo: t.Any)

Source from the content-addressed store, hash-verified

315 return self.copy()
316
317 def __deepcopy__(self, memo: t.Any) -> Config:
318 new_config = type(self)()
319 for key, value in self.items():
320 if isinstance(value, (Config, LazyConfigValue)):
321 # deep copy config objects
322 value = copy.deepcopy(value, memo)
323 elif type(value) in {dict, list, set, tuple}:
324 # shallow copy plain container traits
325 value = copy.copy(value)
326 new_config[key] = value
327 return new_config
328
329 def __getitem__(self, key: str) -> t.Any:
330 try:

Callers

nothing calls this directly

Calls 1

copyMethod · 0.80

Tested by

no test coverage detected