This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Johan Hidding
Recipients Johan Hidding
Date 2019-08-15.12:02:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Given a class `A` that overloads `__getattr__`

class A:
  def __getattr__(self, key):
    return 0

An instance of this class is always identified as a dataclass.

from dataclasses import is_dataclass

a = A()

gives the output `True`.

Possible fix: check for the instance type.


does give the correct answer.
Date User Action Args
2019-08-15 12:02:15Johan Hiddingsetrecipients: + Johan Hidding
2019-08-15 12:02:15Johan Hiddingsetmessageid: <>
2019-08-15 12:02:15Johan Hiddinglinkissue37868 messages
2019-08-15 12:02:15Johan Hiddingcreate