]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44024: Improve the TypeError message in getattr and hasattr (GH-25863)
authorGéry Ogam <gery.ogam@gmail.com>
Tue, 18 Jan 2022 20:46:26 +0000 (21:46 +0100)
committerGitHub <noreply@github.com>
Tue, 18 Jan 2022 20:46:26 +0000 (22:46 +0200)
commit16bf9bd157c7bf5f9c60414fa8e0fe5047c55a9b
treeb292c0e5249522ef373b9c0b93acb09430706864
parent60ceedbdd5b5fb22803039a59954798d931f659a
bpo-44024: Improve the TypeError message in getattr and hasattr (GH-25863)

Use common error message for non-string attribute name in the builtin
functions getattr and hasattr.
The special check no longer needed since Python 3.0.
Lib/test/test_builtin.py
Misc/NEWS.d/next/Core and Builtins/2021-05-04-21-55-49.bpo-44024.M9m8Qd.rst [new file with mode: 0644]
Python/bltinmodule.c