Message383648
> It's been a while, I've lost context for this idea. What problem are you trying to solve here? Are there issues where people have reported problems that this would allow them to solve?
Context: https://github.com/python/cpython/pull/20434#discussion_r499289645
tl;dr:
import inspect
def foo():
class F: ...
def foo(bar: F): ...
print(inspect.signature(foo))
foo()
Normally, if inspect.signature is able to resolve annotations with the current globals()/locals() it will give the resolved version, if not the string version. So adding this would allow people to choose which namespace inspect.signature will pass to the typing.get_type_hints. (inspect.signature(foo, localns=locals()) would give directly the F object instead of 'F', etc.) |
|
Date |
User |
Action |
Args |
2020-12-23 13:33:58 | BTaskaya | set | recipients:
+ BTaskaya, gvanrossum, yselivanov |
2020-12-23 13:33:58 | BTaskaya | set | messageid: <1608730438.02.0.643840163874.issue41960@roundup.psfhosted.org> |
2020-12-23 13:33:58 | BTaskaya | link | issue41960 messages |
2020-12-23 13:33:57 | BTaskaya | create | |
|