Changes between Initial Version and Version 5 of Ticket #34260
- Timestamp:
- Jan 16, 2023, 6:43:30 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34260
- Property Summary Field reference documentation doesn't mention that +inf, -inf, and NaN are invalid → models.FloatField documentation doesn't mention that +inf, -inf, and NaN are database-dependent.
-
Ticket #34260 – Description
initial v5 1 The model field reference documentation doesn't mention that, in a FloatField, the values must pass `math.isfinite`. This excludes `float('inf')` (positive and negative) and `float('nan')`. I saw old discussion about why this is the case, but only after being bitten by it in a project. I'd like to submit a patch adding this info to the docs.1 The model field reference documentation doesn't mention that, in a FloatField, non-numeric values have database-dependent behavior. `float('nan')` on SQLite requires the field to be nullable, for example. I saw old discussion about why this is the case, but only after being bitten by it in a project. I'd like to submit a patch adding this info to the docs.