Message397654
Also, the dot after the first 'b' was confusing to me: I thought it had something to do with an attribute of b. And the quotes around the second 'b' were also confusing, but that's mostly because the original example initialized a class variable named 'b' with the str value 'b'.
Maybe a better error would use a colon:
AttributeError: foo: Did you mean: 'foo1'?
Looking at 3.10s behavior, I can't decide what logic it's using to suggest something:
>>> 'foo'.formatx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'str' object has no attribute 'formatx'. Did you mean: 'format'?
>>> class C: pass
...
>>> C().a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'C' object has no attribute 'a' |
|
Date |
User |
Action |
Args |
2021-07-16 19:21:56 | eric.smith | set | recipients:
+ eric.smith, pablogsal |
2021-07-16 19:21:56 | eric.smith | set | messageid: <1626463316.41.0.592910963075.issue44655@roundup.psfhosted.org> |
2021-07-16 19:21:56 | eric.smith | link | issue44655 messages |
2021-07-16 19:21:56 | eric.smith | create | |
|