Changes between Version 1 and Version 2 of Ticket #35731, comment 5


Ignore:
Timestamp:
Sep 5, 2024, 2:33:52 PM (2 weeks ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35731, comment 5

    v1 v2  
    1616
    1717
    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.
     18In 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.
    1919
    2020> 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.
Back to Top