Skip to content Skip to sidebar Skip to footer
Showing posts with the label Cpython

Cpython String Addition Optimisation Failure Case

The Question Why, in CPython, does def add_string(n): s = '' for _ in range(n): … Read more Cpython String Addition Optimisation Failure Case

How To Call A C-api Function Such As Pyunicode_read_char From Cython?

I'm using Cython to speed up a function that operates over a string (unicode, CPython 3.6). How… Read more How To Call A C-api Function Such As Pyunicode_read_char From Cython?

Storing Python Objects In A Python List Vs. A Fixed-length Numpy Array

In doing some bioinformatics work, I've been pondering the ramifications of storing object inst… Read more Storing Python Objects In A Python List Vs. A Fixed-length Numpy Array

What Does __flags__ In Python Type Used For

I have been read pickle source code recently. The following code in copy_reg make me confused: _HEA… Read more What Does __flags__ In Python Type Used For

Undefined Symbol: Pyos_mystrnicmp

I tried installing pysqlite, but I'm having some trouble using it. >>> import pysqlite… Read more Undefined Symbol: Pyos_mystrnicmp

Value Of Py_none

It is clear to me that None is used to signify the lack of a value. But since everything must have … Read more Value Of Py_none