MCPcopy Create free account
hub / github.com/ipython/ipython / copy

Method copy

IPython/utils/ipstruct.py:234–245  ·  view source on GitHub ↗

Return a copy as a Struct. Examples -------- >>> s = Struct(a=10,b=30) >>> s2 = s.copy() >>> type(s2) is Struct True

(self)

Source from the content-addressed store, hash-verified

232 return self
233
234 def copy(self):
235 """Return a copy as a Struct.
236
237 Examples
238 --------
239
240 >>> s = Struct(a=10,b=30)
241 >>> s2 = s.copy()
242 >>> type(s2) is Struct
243 True
244 """
245 return Struct(dict.copy(self))
246
247 def hasattr(self, key):
248 """hasattr function available as a method.

Callers 15

__add__Method · 0.95
__sub__Method · 0.95
iter_fieldsFunction · 0.45
link_or_copyFunction · 0.45
PyColorize.pyFile · 0.45
mergeMethod · 0.45
setup_environmentFunction · 0.45
test_ipython_embedFunction · 0.45
test_nest_embedFunction · 0.45
check_startup_dirMethod · 0.45
copy_config_fileMethod · 0.45

Calls 1

StructClass · 0.85

Tested by 6

setup_environmentFunction · 0.36
test_ipython_embedFunction · 0.36
test_nest_embedFunction · 0.36
test_xmode_skipFunction · 0.36
launchMethod · 0.36