summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>2017-12-10 00:14:22 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2017-12-10 00:14:22 (GMT)
commit780acc89bccf9999332d334a27887684cc942eb6 (patch)
tree80423316c9121c442620787bfcfc0b657f43b11c /Modules
parent60ed1308304964e5648d8bfc9b74bd549570fa83 (diff)
downloadcpython-780acc89bccf9999332d334a27887684cc942eb6.zip
cpython-780acc89bccf9999332d334a27887684cc942eb6.tar.gz
cpython-780acc89bccf9999332d334a27887684cc942eb6.tar.bz2
bpo-31506: Improve the error message logic for class instantiation (GH-4740)
The error messages in `object.__new__` and `object.__init__` now aim to point the user more directly at the name of the class being instantiated in cases where they *haven't* been overridden (on the assumption that the actual problem is a missing `__new__` or `__init__` definition in the class body). When they *have* been overridden, the errors still report themselves as coming from object, on the assumption that the problem is with the call up to the base class in the method implementation, rather than with the way the constructor is being called.
Diffstat (limited to 'Modules')
0 files changed, 0 insertions, 0 deletions