Brian Curtin <br...@python.org> added the comment:

Here's an updated patch which creates two convenience functions, 
PyErr_SetFromImportErrorWithName and PyErr_SetFromImportErrorWithNameAndPath. I 
figure the two common cases are that you'll want to set just a name or you'll 
want a name and a path.

*WithName is all that I've applied for now, and I've only done it in import.c 
to allow Brett to continue with his work. I'll come back and make changes 
elsewhere in the code, and I'll apply the *WithNameAndPath function where I 
need it for #10854.

All tests pass and some IRL testing works nicely.

Note: I'm a little rushed at the moment so I have not included docs but I will 
surely update them. I just want to get Brett what he needs by this afternoon.

----------
Added file: http://bugs.python.org/file24467/issue1559549_v2.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1559549>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to