Camion <camion_spam-pyb...@yahoo.com> added the comment:

By the way, I guess if the problem arises like that, it's because it might be 
hard to distinguish both situations at the interpreter level, but if it was 
possible, it would be the best solution to have a different error message (even 
if I understand we should be very careful with the idea of changing the 
exception type, even in this case).

I mean : Eric shown an equivalent error, but both are only equivalent at the 
present discrimination level of the interpreter & language grammar.  I 
understand that distinguishing both those semantically different situation 
might be opening the Pandora box and it might be a bad idea... or not.

The point is that, if ever both those situations were in some way 
distinguishable, then... well... we certainly have no idea of how much code 
confronted with this specific situation AND treated it with exception handling, 
BUT, we might make the assumption that a frequent confrontation with this case 
would then already have been raised before, and consequently, it might be 
relevant, at least to keep it in mind for a future evolution (4.0) of the 
language.

----------

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

Reply via email to