Natalia B. Bidart <nataliabid...@gmail.com> added the comment:

On Tue, Mar 15, 2011 at 7:15 AM, Éric Araujo <rep...@bugs.python.org> wrote:
>
> Éric Araujo <mer...@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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11501>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to