bpo-31506: Improve the error message logic for object_new & object_init#4740
Conversation
…it for class without any method overrides
|
@CuriousLearner If I recall correctly, Then |
|
@ncoghlan Seems like you're right. That was a special case. I wanted to know what would be the best file to add these test cases in? |
|
@CuriousLearner I'd suggest adding a new |
|
@ncoghlan I've updated the patch and added test cases. Can you please have a look? |
With this patch applied, the classes without any method overrides behaves like this:
And for classes having method overrides, it behaves like this:
cc @ncoghlan . I'm still trying to figure out the changes to be done for cases of
object.__init__(D(), 42)andD().__init__(42)because they don't report error right now.https://bugs.python.org/issue31506