cpython
Is there anything static about python function / method invocations?
In asking a question about reflection I asked: Nice answer. But there is a difference between saying myobject.foo() and x = getattr(myobject, \"foo\"); x();. Even if it is only cosmetic. In the firs[详细]
2023-02-05 23:17 分类:问答Is there anyway to clear python bytecode cache?
each unit test I\'m running is writing python code out to a file, then importing it as a module.The problem is that the code changes but further import statements don\'t modify the module.[详细]
2023-02-04 11:04 分类:问答mmapping in Python C modules - any pitfalls to be aware of?
I\'m writing a Python module in C and I intend to mmap largeish blocks of memory (perhaps 500 MB). Is there anything about working i开发者_运维技巧n the same process space as the Python interpreter th[详细]
2023-01-31 20:07 分类:问答Python C extension not threadsafe?
I made a c extension out of a python script that was fairly labour intensive. The code itself is well tested and simple. The c extension is called with a few large lists, and it then performs some cle[详细]
2023-01-22 02:50 分类:问答How can I add a command to the Python interactive shell?
I\'m trying to save myself just a few keystrokes for a command I type fairly regularly in Python. In my python startup script, I define a function called load which is similar to import, but adds som[详细]
2023-01-21 17:11 分类:问答What does cpython do to help detect object cycles(reference counting)?
From what I\'ve read about cpython it seems like it does reference counting + something extra to detect/free objects pointing to each other.(Correct me if I\'m wrong). Could someone explain the someth[详细]
2023-01-17 10:01 分类:问答How can I pass map<string,string> into py with API?
C/C++ can use python API to load py. But, only simple type is supported. How can I pass map into py to be a dict with API?[详细]
2023-01-07 03:31 分类:问答Comparable type in extension module
To implement != and == for my CPython extens开发者_JS百科ion type, should I implement tp_compare, tp_richcompare or both?[详细]
2022-12-30 16:42 分类:问答To convert PyBytesObject type to PyUnicodeObject type in python3
How to convert pyunicodeobject type to pybytesobject type? Example: function(PyBytesObject* byteobj){ ....operation..[详细]
2022-12-30 07:23 分类:问答
加载中,请稍侯......