What is a PyObject in Python?

前端 未结 2 1298
醉话见心
醉话见心 2021-01-17 07:30

Short version

I recently came across some Python code in which the return type for a function was specified as PyObject in the document

2条回答
  •  长发绾君心
    2021-01-17 07:51

    Every value you can touch in Python is a PyObject in C. That includes lists, dictionaries, sockets, files, integers, strings, functions, classes, you name it. If you can touch it in Python, it’s a PyObject in C.

提交回复
热议问题