gristlabs_grist-core/sandbox/grist/functions
Alex Hall aa88c156e6 (core) Don't swallow TypeErrors in functions like SUM
Summary: Math functions like SUM which call `_chain` were catching `TypeError`s raised by the iterable arguments themselves, e.g. `SUM(r.A / r.B for r in $group)` where `r.A / r.B` raises a `TypeError` would silently return wrong results. This diff narrows the `try/catch` to only check whether the argument is iterable as intended, but not catch errors from the process of iterating.

Test Plan: Added Python unit test.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3679
2022-10-25 12:15:13 +02:00
..
__init__.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
date.py (core) Upgrade sortedcontainers, python_dateutil, and html5lib for better Python 3.10 compatibility 2022-08-30 16:46:29 +02:00
info.py (core) Convince grist-help that REQUEST is really unimplemented 2022-08-23 19:25:27 +02:00
logical.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
lookup.py (core) Add a row to summary tables grouped by list column(s) corresponding to empty lists 2022-06-09 23:38:14 +02:00
math.py (core) Don't swallow TypeErrors in functions like SUM 2022-10-25 12:15:13 +02:00
schedule.py (core) New type conversion in the backend 2022-02-04 20:28:13 +02:00
stats.py (core) Allow using MIN and MAX functions with dates/datetimes 2022-08-09 13:34:22 +02:00
test_schedule.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
text.py (core) Add PHONE_FORMAT function using the phonenumberslight library 2022-10-21 08:13:18 -04:00
unimplemented.py (core) Improve suggestions for formula autocomplete 2020-09-12 00:21:29 -04:00