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 <>
> 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.
Date User Action Args
2020-04-04 22:54:24serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, BTaskaya
2020-04-04 22:54:24serhiy.storchakasetmessageid: <>
2020-04-04 22:54:24serhiy.storchakalinkissue40180 messages
2020-04-04 22:54:24serhiy.storchakacreate