title: Check if a class is a dataclass in Python
body: <p>How can I check if a class is a <code>dataclass</code> in Python?</p>
  
  <p>I found out that I can check the existance of <code>__dataclass_fields__</code> and <code>__dataclass_params__</code> attributes, but I'd love to find a more elegant way to do this.</p>
  
  <p>I'd expect using something like <code>inspect.isclass</code> function. Maybe something like <code>inspect.isdataclass</code>, for example.</p>
  
  <p>Does Python have something like that?</p>
  
  <p>Thanks.</p>