This allows you to specify fields that have a default value of null.
I wanted to specify a field that can be null or some other value, with a default of null. Using the default of None as a sentinel for "no default" prevented me from doing this.
I'd normally have preferred to change the default parameter to a SENTINEL_NONE object that is merely an object() to allow None to represent null properly, but I can't do that without breaking API compatibility with the get_default() method.
This allows you to specify fields that have a default value of null.
I wanted to specify a field that can be null or some other value, with a default of null. Using the default of None as a sentinel for "no default" prevented me from doing this.
I'd normally have preferred to change the default parameter to a SENTINEL_NONE object that is merely an
object()
to allow None to represent null properly, but I can't do that without breaking API compatibility with theget_default()
method.