homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients acapnotic, iritkatriel, nailor
Date 2020年09月18日.17:30:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1600450236.64.0.563814925448.issue15128@roundup.psfhosted.org>
In-reply-to
Content
I think this was fixed by now:
I changed the script to print the result:
******************************************
import inspect, sys
# /etc/hostname is one line, but our source has multiple lines
code = compile('\n\n\n1/0', '/etc/hostname', 'exec')
try:
 exec(code, {})
except Exception:
 tb = sys.exc_info()[2]
else:
 assert False, "unreachable, exec should always raise exception"
# this fails with an IndexError
print(inspect.getinnerframes(tb))
******************************************
and I got this output:
C:\Users\User\src\cpython>python.bat x.py
Running Release|Win32 interpreter...
[FrameInfo(frame=<frame at 0x01140DF0, file 'C:\\Users\\User\\src\\cpython\\x.py', line 14, code <module>>, filename='C:\\Users\\User\\src\\cpython\\x.py', lineno=7, function='<module>', code_context=[' exec(code, {})\n'], index=0), FrameInfo(frame=<frame at 0x011CA758, file '/etc/hostname', line 4, code <module>>, filename='/etc/hostname', lineno=4, function='<module>', code_context=None, index=None)]
History
Date User Action Args
2020年09月18日 17:30:36iritkatrielsetrecipients: + iritkatriel, acapnotic, nailor
2020年09月18日 17:30:36iritkatrielsetmessageid: <1600450236.64.0.563814925448.issue15128@roundup.psfhosted.org>
2020年09月18日 17:30:36iritkatriellinkissue15128 messages
2020年09月18日 17:30:36iritkatrielcreate

AltStyle によって変換されたページ (->オリジナル) /