I have code that checks for named tuples and dataclasses by looking for a _fields attribute: if hasattr(candidate, '_fields'): do_action() How can I express this with Python 3.10's match/case structural pattern matching? Continue reading...