Message322728
This now leaves `inspect.getsource` inconsistent with `inspect.getsourcefile`:
>>> import inspect
>>> from contextlib import contextmanager
>>> @contextmanager
... def func():
... yield
>>> inspect.getsource(func)
'@contextmanager\ndef func():\n yield\n'
>>>inspect.getsourcefile(func)
'C:\\Program Files\\Python 3.5\\lib\\contextlib.py'
Should `getsourcefile` be changed to match?
This is causing numpy/numpy#11639, but it's not clear if this is a bug or by design. |
|
Date |
User |
Action |
Args |
2018-07-31 06:13:44 | Eric.Wieser | set | recipients:
+ Eric.Wieser, michele_s, belopolsky, pitrou, christian.heimes, gpolo, ysj.ray, Claudiu.Popa, python-dev, yselivanov |
2018-07-31 06:13:44 | Eric.Wieser | set | messageid: <1533017624.47.0.56676864532.issue1764286@psf.upfronthosting.co.za> |
2018-07-31 06:13:44 | Eric.Wieser | link | issue1764286 messages |
2018-07-31 06:13:44 | Eric.Wieser | create | |
|