Author ncoghlan
Recipients alexandre.vassalotti, andy-chu, loewis, ncoghlan, paul.moore, pje
Date 2007-09-11.14:19:47
SpamBayes Score 0.00131368
Marked as misclassified No
Message-id <1189520388.18.0.717641811773.issue1739468@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2007-09-11 14:19:48ncoghlansetspambayes_score: 0.00131368 -> 0.00131368
recipients: + ncoghlan, loewis, paul.moore, pje, andy-chu, alexandre.vassalotti
2007-09-11 14:19:48ncoghlansetspambayes_score: 0.00131368 -> 0.00131368
messageid: <1189520388.18.0.717641811773.issue1739468@psf.upfronthosting.co.za>
2007-09-11 14:19:48ncoghlanlinkissue1739468 messages
2007-09-11 14:19:47ncoghlancreate