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 serhiy.storchaka
Recipients BTaskaya, serhiy.storchaka, terry.reedy
Date 2020-04-04.22:54:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586040864.6.0.479972009257.issue40180@roundup.psfhosted.org>
In-reply-to
Content
> Sorry, I should have quoted the doc.  " If object is not an object of the given type, the function always returns False."  Raising instead is a bug -- even of the object itself is somewhat buggy.

You take it too literally. It does not mean that the function always returns a value. It can also raise an exception. If you press Ctrl-C it may raise an exception. If there is no memory to create some temporary objects, it may raise an exception. If you turn of the computer, it may neither return a value nor raise an exception.

You created a class whose __class__ attribute always raises an exception. What do you expect to get when you use this attribute? {}.__getitem__ always raise a KeyError, because an empty dict does not contain any key.
History
Date User Action Args
2020-04-04 22:54:24serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, BTaskaya
2020-04-04 22:54:24serhiy.storchakasetmessageid: <1586040864.6.0.479972009257.issue40180@roundup.psfhosted.org>
2020-04-04 22:54:24serhiy.storchakalinkissue40180 messages
2020-04-04 22:54:24serhiy.storchakacreate