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

How To Edit Cpython's Lib/importlib/_bootstrap.py?

I would like to play with CPython's Lib/importlib/_bootstrap.py file, but my edits in my curren… Read more How To Edit Cpython's Lib/importlib/_bootstrap.py?

Why Does Tuple(set([1,"a","b","c","z","f"])) == Tuple(set(["a","b","c","z","f",1])) 85% Of The Time With Hash Randomization Enabled?

Given Zero Piraeus' answer to another question, we have that x = tuple(set([1, 'a', … Read more Why Does Tuple(set([1,"a","b","c","z","f"])) == Tuple(set(["a","b","c","z","f",1])) 85% Of The Time With Hash Randomization Enabled?

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

How Does Module Loading Work In Cpython?

How does module loading work in CPython under the hood? Especially, how does the dynamic loading of… Read more How Does Module Loading Work In Cpython?

Python Threads Are Not Improving Speed

In order to speed up a certain list processing logic, I wrote a decorator that would 1) intercept i… Read more Python Threads Are Not Improving Speed

In C Python, Accessing The Bytecode Evaluation Stack

Given a C Python frame pointer, how do I look at arbitrary evaluation stack entries? (Some specific… Read more In C Python, Accessing The Bytecode Evaluation Stack

Python: Where Is The Code For Os.mkdir?

I've been looking through the code of the os module (just to be clear, I'm looking at the f… Read more Python: Where Is The Code For Os.mkdir?

Why Is It Slower To Iterate Over A Small String Than A Small List?

I was playing around with timeit and noticed that doing a simple list comprehension over a small st… Read more Why Is It Slower To Iterate Over A Small String Than A Small List?