Top "Python-internals" questions

How does Python work underneath the hood?

How does the @property decorator work in Python?

I would like to understand how the built-in function property works. What confuses me is that property can also be …

python properties decorator python-decorators python-internals
When is del useful in python?

I can't really think of any reason why python needs the del keyword (and most languages seem to not have …

python dictionary python-internals del
time.sleep -- sleeps thread or process?

In Python for *nix, does time.sleep() block the thread or the process?

python multithreading time sleep python-internals
Usage of __slots__?

What is the purpose of __slots__ in Python — especially with respect to when I would want to use it, and …

python oop python-internals slots
Why is "1000000000000000 in range(1000000000000001)" so fast in Python 3?

It is my understanding that the range() function, which is actually an object type in Python 3, generates its contents on …

python performance python-3.x range python-internals
Are dictionaries ordered in Python 3.6+?

Dictionaries are ordered in Python 3.6 (under the CPython implementation at least) unlike in previous incarnations. This seems like a substantial …

python python-3.x dictionary python-internals python-3.6
Finding the source code for built-in Python functions?

Is there a way to see how built in functions work in python? I don't mean just how to use …

python python-internals
Are tuples more efficient than lists in Python?

Is there any performance difference between tuples and lists when it comes to instantiation and retrieval of elements?

python performance list tuples python-internals
How is Python's List Implemented?

Is it a linked list, an array? I searched around and only found people guessing. My C knowledge isn't good …

python arrays list linked-list python-internals
"is" operator behaves unexpectedly with integers

Why does the following behave unexpectedly in Python? >>> a = 256 >>> b = 256 >>> a …

python int operators identity python-internals