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 nessita
Recipients alexis, eric.araujo, ezio.melotti, nessita, tarek
Date 2011-03-15.12:40:33
SpamBayes Score 1.4765861e-10
Marked as misclassified No
Message-id <AANLkTikmO29p+D_2pFT6GKUsBu9pm9U3mhuEuP8hNM2h@mail.gmail.com>
In-reply-to <1300187711.53.0.7789902276.issue11501@psf.upfronthosting.co.za>
Content
On Tue, Mar 15, 2011 at 7:15 AM, Éric Araujo <report@bugs.python.org> wrote:
>
> Éric Araujo <merwok@netwok.org> added the comment:
>
>> I'm not using "if zlib is not None" since the archive_utils module
>> never explicitly imports zlib.
>
> Well, you can import zlib in that module too to detect in advance whether zipfile will work.

Indeed, but from my POV that's less cleaner than the proposed
solution: importing a module that is not used (other than checking for
a condition) may generate confusion to a reader. IMHO, the proposed
solution may ease the readability of the code block by being
super-explicit about what condition is being handled when creating the
ZipFile.

Let me know if you still consider I should change that.
History
Date User Action Args
2011-03-15 12:40:34nessitasetrecipients: + nessita, tarek, ezio.melotti, eric.araujo, alexis
2011-03-15 12:40:33nessitalinkissue11501 messages
2011-03-15 12:40:33nessitacreate