[issue1559549] ImportError needs attributes for module and file name
Filip Gruszczyński
report at bugs.python.org
Sun Mar 6 21:58:49 CET 2011
Filip Gruszczyński <gruszczy at gmail.com> added the comment:
This is a draft of a patch. I have only used this new ImportError api in once place, so it would work with following code:
>>> try:
... import nosuchmodule
... except ImportError as e:
... print(e.module)
...
nosuchmodule
I have literally no experience with Python core, so I would be very grateful for comments and advice, so I could make this patch meet all requirements.
----------
keywords: +patch
Added file: http://bugs.python.org/file21020/1559549_1.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1559549>
_______________________________________
More information about the Python-bugs-list
mailing list