MCPcopy Index your code
hub / github.com/python/cpython / writer_format

Method writer_format

Lib/test/test_capi/test_unicode.py:1988–1995  ·  view source on GitHub ↗
(self, writer, *args)

Source from the content-addressed store, hash-verified

1986 return _testcapi.PyUnicodeWriter(size)
1987
1988 def writer_format(self, writer, *args):
1989 from ctypes import c_char_p, pythonapi, c_int, c_void_p
1990 _PyUnicodeWriter_Format = getattr(pythonapi, "PyUnicodeWriter_Format")
1991 _PyUnicodeWriter_Format.argtypes = (c_void_p, c_char_p,)
1992 _PyUnicodeWriter_Format.restype = c_int
1993
1994 if _PyUnicodeWriter_Format(writer.get_pointer(), *args) < 0:
1995 raise ValueError("PyUnicodeWriter_Format failed")
1996
1997 def test_format(self):
1998 from ctypes import c_int

Callers 2

test_formatMethod · 0.95
test_recover_errorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected