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 terry.reedy
Recipients docs@python, hongweipeng, terry.reedy
Date 2018-05-04.21:42:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1525470158.97.0.682650639539.issue33417@psf.upfronthosting.co.za>
In-reply-to
Content
https://docs.python.org/3/reference/datamodel.html#customizing-instance-and-subclass-checks
says
"Note that these methods are looked up on the type (metaclass) of a class. They cannot be defined as class methods in the actual class. This is consistent with the lookup of special methods that are called on instances, only in this case the instance is itself a class."

IE, your first example is documented as wrong.  Your second example, which works, follows the example in
https://docs.python.org/3/reference/datamodel.html#customizing-instance-and-subclass-checks
History
Date User Action Args
2018-05-04 21:42:38terry.reedysetrecipients: + terry.reedy, docs@python, hongweipeng
2018-05-04 21:42:38terry.reedysetmessageid: <1525470158.97.0.682650639539.issue33417@psf.upfronthosting.co.za>
2018-05-04 21:42:38terry.reedylinkissue33417 messages
2018-05-04 21:42:38terry.reedycreate