[Python-Dev] Dict suppressing exceptions (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Sat Aug 12 08:14:04 CEST 2006
- Previous message: [Python-Dev] Dict suppressing exceptions
- Next message: [Python-Dev] Dict suppressing exceptions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jim Jewett schrieb:
hash was just changed to support the common use of id, even though some people argued it was really a bug in the classes themselves. This is a similar situation.
Similar still different. In the case of hash returning id(), it is very clear what the intention of the program is, and it is implementable to give the program its intended meaning (i.e. use the object address as the source of the hash value).
In this case, it is not clear what the intention of the program is. cmp raises an exception, and you say the intention is that this exception should be discarded? Errors should never pass silently, unless explicitly silenced.
Some users will find "Oops, I didn't know all these years I had this error there", and correct their code. Some will say "why did they break my program", and correct their code - the corrected code will run just fine on older versions of Python as well.
Regards, Martin
- Previous message: [Python-Dev] Dict suppressing exceptions
- Next message: [Python-Dev] Dict suppressing exceptions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]