Opened 2 years ago
Last modified 2 years ago
#34260 closed Cleanup/optimization
Field reference documentation doesn't mention that +inf, -inf, and NaN are invalid — at Initial Version
Reported by: | Matt Cooper | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 4.1 |
Severity: | Normal | Keywords: | floatfield |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
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.
Note:
See TracTickets
for help on using tickets.