Search code examples
Dict comprehension produces seemingly unwarranted NameError...


pythonscopelist-comprehensionpython-internalsdictionary-comprehension

Read More
Why do new style class and old style class have different behavior in this case?...


pythonpython-3.xpython-2.xpython-internals

Read More
Does the len() built-in function iterates through the collection to calculate its length, or does it...


pythonpython-internals

Read More
For sets S and T, why does Python's S -= T take O(len(T)) and not O(len(S))?...


pythonbig-opython-internals

Read More
Lambda-function comparison in python...


pythonlambdapython-internals

Read More
Why `float` function is slower than multiplying by 1.0?...


pythonoptimizationpython-internals

Read More
Why None is the smallest in python?...


pythonpython-internals

Read More
Why does `False is False is False` evaluate to `True`?...


pythonpython-internals

Read More
Is this calculation executed in Python?...


pythonpython-internals

Read More
What is the mechanism that allows Python monkey patching in this instance?...


pythonglobal-variablesmonkeypatchingpython-internalsside-effects

Read More
Puzzled with LOAD_FAST/STORE_FAST of python...


pythonbytecodepython-internals

Read More
Why are tuples slower than lists at evaluating generators into themselves?...


pythonperformancelisttuplespython-internals

Read More
calling a function saved in a class attribute: different behavior with built-in function vs. normal ...


pythonpython-2.7python-internals

Read More
When does Python recognize/not recognize variables from main?...


pythonvariablesglobal-variablespython-internals

Read More
Why doesn't 1 + 1 use BINARY_ADD?...


pythonpython-2.7python-internals

Read More
Why is hardcoding this list slower than calculating it?...


pythonperformancepython-3.xpython-internals

Read More
size of generator object in python...


pythongeneratorpython-internals

Read More
Why do generator expressions and dict/set comprehensions in Python 2 use a nested function unlike li...


pythonbytecodepython-internals

Read More
What's the runtime of Python's strip()?...


pythonpython-2.7python-internals

Read More
Why does it take longer to import a function from a module than the entire module itself?...


pythonperformancepython-importpython-internals

Read More
list comprehension filtering - "the set() trap"...


pythonpython-3.xpython-internals

Read More
scope of eval function in python...


pythonevalpython-internals

Read More
How Python's a, b = b, a works?...


pythonpython-internals

Read More
Static initialization with pointer to extern variable...


cportabilitylinkagepython-internals

Read More
Why does from __future__ import * raise an error?...


pythonpython-internals

Read More
Very strange behavior of operator 'is' with methods...


pythonpython-2.7methodspython-internals

Read More
Which operations can be done in parallel without grabbing the GIL?...


pythonnumpypython-internals

Read More
Get different results in Sublime Text and terminal when I run python code?...


pythonsublimetext2read-eval-print-looppython-internals

Read More
How does module loading work in CPython?...


pythonpython-importcpythondynamic-loadingpython-internals

Read More
Why does a class definition always produce the same bytecode?...


pythonbytecodedisassemblypython-internals

Read More
BackNext