tailot's picture
Upload folder using huggingface_hub
db2c7db verified
Raw History Blame Contribute Delete
437 Bytes
"""Naming a value by what it holds.
One function asks whether a value is None with the equality operators, and that is the
shape the identity comparison pattern rewrites. The other already asks with identity,
and the pattern says so.
"""
def label_for(value):
if value == None:
return "none"
if value != None and value == "":
return "blank"
return "given"
def is_missing(value):
return value is None