python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Native array.frombytes() (not numpy!) mysterious behavior
[I cannot use numpy so please refrain from talking about it]
I (apparently naively) thought Python array.frombytes() would read from a series of bytes representing various machine format integers, dep...
Bob Denny
Votes: 0
Answers: 1
How does CPython implement os.environ?
I was looking through source and noticed that it references a variable environ in methods before its defined:
def _createenviron():
if name == 'nt':
# Where Env Var Names Must Be UPPERCASE...
user8371266
Votes: 0
Answers: 1
20% faster with unused variable? Why?
I'm doing a lot of benchmarks. I've never seen something like this. I'm stumped. Creating an extra global variable, not used at all, makes part of my code about 20% faster. Why?
I'm benchmarking a fun...
Pychopath
Votes: 0
Answers: 0
Does Python not reuse memory here? What does tracemalloc's output mean?
I create a list of a million int objects, then replace each with its negated value. tracemalloc reports 28 MB extra memory (28 bytes per new int object). Why? Does Python not reuse the memory of the g...
Kelly Bundy
Votes: 0
Answers: 1