sentinel value

A special value that can never be real data, used to mark a condition such as "empty", "deleted" or "end".

In more detail

Creating a fresh object() gives a sentinel that nothing else can equal, which is safer than using a value like None or -1 that real data might contain. The course uses one for the tombstone marker. A sentinel node in a linked list applies the same idea to structure.

Related terms

Taught in

References