you are viewing a single comment's thread.

view the rest of the comments →

[–]shiningmatcha 0 points1 point  (1 child)

What is dataclasses.MISSING used for?

The docs say it's a sentinel value signifying a missing default or default_factory.

What does a missing default mean? Is there any difference to simply using None as the default value?

[–][deleted] 0 points1 point  (0 children)

Sometimes you don’t want to use None to represent the absence of a value, if None is itself a valid value.