median_grouped(interval='bad') raises TypeError: Value cannot be converted to a float, but the original ValueError is lost (__cause__=None).
import statistics
try:
statistics.median_grouped([1, 2, 3], interval='bad')
except TypeError as e:
print(e) # Value cannot be converted to a float
print(e.__cause__) # None
Tested on Python 3.14 (main branch).
Linked PRs
median_grouped(interval='bad')raisesTypeError: Value cannot be converted to a float, but the originalValueErroris lost (__cause__=None).Tested on Python 3.14 (main branch).
Linked PRs