Commit 16bf9bd
authored
bpo-44024: Improve the TypeError message in getattr and hasattr (pythonGH-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.1 parent 60ceedb commit 16bf9bd
File tree
3 files changed
+16
-14
lines changed- Lib/test
- Misc/NEWS.d/next/Core and Builtins
- Python
3 files changed
+16
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
512 | 515 | | |
513 | 516 | | |
514 | 517 | | |
| |||
801 | 804 | | |
802 | 805 | | |
803 | 806 | | |
804 | | - | |
805 | | - | |
806 | 807 | | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
807 | 812 | | |
808 | 813 | | |
809 | 814 | | |
810 | 815 | | |
811 | 816 | | |
812 | 817 | | |
813 | | - | |
814 | 818 | | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
815 | 822 | | |
816 | 823 | | |
817 | 824 | | |
| |||
1457 | 1464 | | |
1458 | 1465 | | |
1459 | 1466 | | |
1460 | | - | |
1461 | 1467 | | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
1462 | 1472 | | |
1463 | 1473 | | |
1464 | 1474 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1091 | 1091 | | |
1092 | 1092 | | |
1093 | 1093 | | |
1094 | | - | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
1099 | 1094 | | |
1100 | 1095 | | |
1101 | 1096 | | |
| |||
1156 | 1151 | | |
1157 | 1152 | | |
1158 | 1153 | | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | 1154 | | |
1165 | 1155 | | |
1166 | 1156 | | |
| |||
0 commit comments