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

Method copy

tables/link.py:103–125  ·  view source on GitHub ↗

Copy this link and return the new one. See :meth:`Node._f_copy` for a complete explanation of the arguments. Please note that there is no recursive flag since links do not have child nodes.

(
        self,
        newparent: Group | None = None,
        newname: str | None = None,
        overwrite: bool = False,
        createparents: bool = False,
    )

Source from the content-addressed store, hash-verified

101
102 # Public and tailored versions for copy, move, rename and remove methods
103 def copy(
104 self,
105 newparent: Group | None = None,
106 newname: str | None = None,
107 overwrite: bool = False,
108 createparents: bool = False,
109 ) -> Link:
110 """Copy this link and return the new one.
111
112 See :meth:`Node._f_copy` for a complete explanation of the arguments.
113 Please note that there is no recursive flag since links do not have
114 child nodes.
115
116 """
117 newnode = self._f_copy(
118 newparent=newparent,
119 newname=newname,
120 overwrite=overwrite,
121 createparents=createparents,
122 )
123 # Insert references to a `newnode` via `newname`
124 newnode._v_parent._g_refnode(newnode, newname, True)
125 return newnode
126
127 def move(
128 self,

Callers

nothing calls this directly

Calls 2

_g_refnodeMethod · 0.80
_f_copyMethod · 0.45

Tested by

no test coverage detected