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

Method __repr__

tables/description.py:239–251  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

237 return NewCol
238
239 def __repr__(self) -> str:
240 # Reuse the atom representation.
241 atomrepr = super().__repr__()
242 lpar = atomrepr.index("(")
243 rpar = atomrepr.rindex(")")
244 atomargs = atomrepr[lpar + 1 : rpar]
245 classname = self.__class__.__name__
246 if self._v_col_attrs:
247 return (
248 f"{classname}({atomargs}, pos={self._v_pos}"
249 f", attrs={self._v_col_attrs})"
250 )
251 return f"{classname}({atomargs}, pos={self._v_pos})"
252
253 def _get_init_args(self) -> dict[str, Any]:
254 """Get a dictionary of instance constructor arguments."""

Callers

nothing calls this directly

Calls 1

indexMethod · 0.80

Tested by

no test coverage detected