Message368635
Consider the following:
```
import re
class MyClass(object):
def re(self):
pass
def foo(self, m: re.Match):
pass
```
Even though `re` and `MyClass.re` are distinct namespaces, the type annotation misses that fact (presumably there is an issue with how it is parsing the AST) and attempts to access MyClass.re.Match, resulting in:
`AttributeError: 'function' object has no attribute 'Match'`
Commenting out the definition of `MyClass.re` or reversing the definition order resolves the issue. |
|
Date |
User |
Action |
Args |
2020-05-11 17:19:58 | robieta | set | recipients:
+ robieta |
2020-05-11 17:19:58 | robieta | set | messageid: <1589217598.74.0.170713443577.issue40595@roundup.psfhosted.org> |
2020-05-11 17:19:58 | robieta | link | issue40595 messages |
2020-05-11 17:19:58 | robieta | create | |
|