MCPcopy Create free account
hub / github.com/scanny/python-pptx / new

Method new

src/pptx/oxml/table.py:307–321  ·  view source on GitHub ↗

Return a new `a:tc` element subtree.

(cls)

Source from the content-addressed store, hash-verified

305
306 @classmethod
307 def new(cls) -> CT_TableCell:
308 """Return a new `a:tc` element subtree."""
309 return cast(
310 CT_TableCell,
311 parse_xml(
312 f"<a:tc {nsdecls('a')}>\n"
313 f" <a:txBody>\n"
314 f" <a:bodyPr/>\n"
315 f" <a:lstStyle/>\n"
316 f" <a:p/>\n"
317 f" </a:txBody>\n"
318 f" <a:tcPr/>\n"
319 f"</a:tc>"
320 ),
321 )
322
323 @property
324 def row_idx(self) -> int:

Callers 1

_new_tcMethod · 0.45

Calls 2

parse_xmlFunction · 0.90
nsdeclsFunction · 0.90

Tested by

no test coverage detected