Skip to main content
gerrit's user avatar
gerrit's user avatar
gerrit's user avatar
gerrit
  • Member for 12 years, 9 months
  • Last seen more than a week ago
118 votes
5 answers
26k views

Python's many ways of string formatting — are the older ones (going to be) deprecated?

91 votes
1 answer
25k views

What is the meaning of a forward slash "/" in a Python method signature, as shown by help(foo)? [duplicate]

73 votes
3 answers
9k views

List comprehension scope error from Python debugger

33 votes
4 answers
19k views

Why disable the garbage collector?

33 votes
2 answers
5k views

What is a DynamicClassAttribute and how do I use it?

32 votes
4 answers
19k views

Why is caplog.text empty, even though the function I'm testing is logging?

27 votes
2 answers
5k views

How do I use importlib.LazyLoader?

25 votes
1 answer
14k views

Why are parenthesis optional when defining a class, but mandatory when defining a function?

24 votes
1 answer
3k views

When are python sunder names used?

20 votes
2 answers
10k views

Numpy octuple precision floats and 128 bit ints. Why and how?

20 votes
5 answers
7k views

Why does date + timedelta become date, not datetime?

19 votes
2 answers
1k views

Unicode subscripts and superscripts in identifiers, why does Python consider XU == Xᵘ == Xᵤ?

19 votes
1 answer
858 views

Why does creating this memoryview raise a ValueError only when assigning to a variable?

16 votes
1 answer
306 views

What does the empty `()` do on a Matlab matrix?

15 votes
1 answer
3k views

Memory-efficient way to truncate large array in Matlab

14 votes
3 answers
3k views

In numpy, what does indexing an array with the empty tuple vs. ellipsis do?

14 votes
2 answers
974 views

How do I check if current code is part of a try-except-block?

13 votes
1 answer
2k views

Filtering based on custom warning categories

13 votes
2 answers
1k views

Use case for low-level os.open, os.fdopen, and friends?

12 votes
1 answer
16k views

How do I use `setrlimit` to limit memory usage? RLIMIT_AS kills too soon; RLIMIT_DATA, RLIMIT_RSS, RLIMIT_STACK kill not at all

11 votes
2 answers
612 views

When can I pass a literal : to a function?

11 votes
2 answers
2k views

Subclassing file by subclassing `io.TextIOWrapper` — but what signature does its constructor have?

10 votes
1 answer
2k views

Save breakpoints to file

9 votes
1 answer
2k views

Numpy fast check for complete array equality, like Matlabs isequal

9 votes
1 answer
642 views

Why is `'↊'.isnumeric()` false?

8 votes
1 answer
2k views

xarray with masked arrays while preserving integer dtypes

8 votes
1 answer
936 views

Make 'interact' use IPython console, rather than standard Python one?

8 votes
1 answer
2k views

Why is .sum() faster than .any() or .max()?

8 votes
1 answer
1k views

Why does .mro() on a metaclass have a different signature? `descriptor 'mro' of 'type' object needs an argument`

7 votes
3 answers
2k views

When can I pass a function handle?

1
2 3 4 5 6