[Python-Dev] Let's stop eating exceptions in dict lookup (original) (raw)
Fredrik Lundh fredrik at pythonware.com
Tue May 30 07:48:50 CEST 2006
- Previous message: [Python-Dev] Let's stop eating exceptions in dict lookup
- Next message: [Python-Dev] Let's stop eating exceptions in dict lookup
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Armin Rigo wrote:
I know this. These corner cases are debatable and different answers could be seen as correct, as I think is the case for find(). My point was different: I was worrying that the recent change in str.find() would needlessly send existing and working programs into infinite loops, which can be a particularly bad kind of failure for some applications.
since "abc".find("", 0) == 0, I would have thought that a program that searched for an empty string in a loop wouldn't get anywhere at all.
- Previous message: [Python-Dev] Let's stop eating exceptions in dict lookup
- Next message: [Python-Dev] Let's stop eating exceptions in dict lookup
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]