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 ncoghlan
Recipients alexandre.vassalotti, andy-chu, loewis, ncoghlan, paul.moore, pje
Date 2007-09-11.14:19:47
SpamBayes Score 0.0013136796
Marked as misclassified No
Message-id <>
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
Date User Action Args
2007-09-11 14:19:48ncoghlansetspambayes_score: 0.00131368 -> 0.0013136796
recipients: + ncoghlan, loewis, paul.moore, pje, andy-chu, alexandre.vassalotti
2007-09-11 14:19:48ncoghlansetspambayes_score: 0.00131368 -> 0.00131368
messageid: <>
2007-09-11 14:19:48ncoghlanlinkissue1739468 messages
2007-09-11 14:19:47ncoghlancreate