Commit 8eb317c
committed
gh-152692: Fix annotationlib.type_repr() for bound built-in methods
type_repr() returned a string naming a nonexistent module None -- e.g.
type_repr([].append) == 'None.list.append' -- for bound built-in methods,
whose __module__ is None.
Return the qualified name when __module__ is None, as already done for the
"builtins" module.1 parent ecdef17 commit 8eb317c
3 files changed
Lines changed: 10 additions & 1 deletion
File tree
- Lib
- test
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1090 | 1090 | | |
1091 | 1091 | | |
1092 | 1092 | | |
1093 | | - | |
| 1093 | + | |
| 1094 | + | |
1094 | 1095 | | |
1095 | 1096 | | |
1096 | 1097 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1850 | 1850 | | |
1851 | 1851 | | |
1852 | 1852 | | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
1853 | 1857 | | |
1854 | 1858 | | |
1855 | 1859 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments