[issue1739468] Add a -z interpreter flag to execute a zip file

Nick Coghlan report at bugs.python.org
Tue Sep 11 16:19:48 CEST 2007


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 <report at bugs.python.org>
<http://bugs.python.org/issue1739468>
_____________________________________


More information about the Python-bugs-list mailing list