Parsing arguments and building values — Python 3.9.25 documentation

docs.python.org

Tin mới

Data marshalling support

String conversion and formatting

Python documentation for the current stable release

Python documentation for the current stable release

These functions are useful when creating your own extensions functions and methods. Additional information and examples are available in Extending and Embedding the Python Interpreter.

Python Module Index

3.9.25 Documentation

Python/C API Reference Manual

Extending and Embedding the Python Interpreter

These functions are useful when creating your own extensions functions and methods. Additional information and examples are available in Extending and Embedding the Python Interpreter.

Strings and buffers¶

These formats allow accessing an object as a contiguous chunk of memory. You don’t have to provide raw storage for the returned unicode or bytes area.

Py_BEGIN_ALLOW_THREADS

These formats allow accessing an object as a contiguous chunk of memory. You don’t have to provide raw storage for the returned unicode or bytes area.

Strings and buffers¶

These formats allow accessing an object as a contiguous chunk of memory. You don’t have to provide raw storage for the returned unicode or bytes area.

PyBufferProcs.bf_releasebuffer

These formats allow accessing an object as a contiguous chunk of memory. You don’t have to provide raw storage for the returned unicode or bytes area.

Strings and buffers¶

These formats allow accessing an object as a contiguous chunk of memory. You don’t have to provide raw storage for the returned unicode or bytes area.

PyUnicode_FSConverter()

This format does not accept bytes-like objects. If you want to accept filesystem paths and convert them to C character strings, it is preferable to use the O& format with PyUnicode_FSConverter() as converter.