Thomas Kluyver added the comment:

1. For the cases like read/write handles conflicting, ValueError doesn't seem 
quite right to me - I take ValueError to mean that you have passed an invalid 
value to a function. RuntimeError feels like the closest fit for 'the current 
state does not allow this operation'. It is rather broad, though.

If I was writing it anew, I would use ValueError for something like an invalid 
mode parameter: zf.open('foo', mode='q') . That particular case was already in 
the code, though, so I think backwards compatibility should take precedence.

2 & 3. Agreed, I'll prepare a patch

----------

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

Reply via email to