Nick Coghlan added the comment:

I like PJE's approach, and the patch works for me.

About the only thing I'd change is to switch the expression in
PyImport_GetImporter to a simple chain of if-statements in order to:
  - silence the warning from GCC about an unused value
  - make it more obvious to a reader what the function is doing

An optimising compiler is going to produce similar code either way, and
it took me a moment to realise that the && operations are being used
purely for their short-circuiting effect, even though there is no real
advantage to using an expression instead of a statement at that point in
the code.

Adding a simple test of the functionality to test_cmd_line would also be
good.

_____________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1739468>
_____________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to