Changes between Version 1 and Version 2 of Ticket #35731, comment 5
- Timestamp:
- Sep 5, 2024, 2:33:52 PM (3 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35731, comment 5
v1 v2 16 16 17 17 18 In other words we can't use `None` as a sentinel denote a fallback to `db_default` as it might be explicitly assigned as a desired value.18 In other words we can't use `None` as a sentinel to denote a fallback to `db_default` as it might be explicitly assigned as a desired value. 19 19 20 20 > If default is passed to the field, then val has a type of int. If it's not, then its type is int | None. In my proposal above, passing db_default wouldn't change the type of foo, whereas the current implementation means its type is int | DatabaseDefault, int | None, or int, depending on what combo of default and db_default is passed.