[Python-Dev] Counting collisions for the win
Ethan Furman
ethan at stoneleaf.us
Fri Jan 20 20:27:07 CET 2012
Donald Stufft wrote:
> Even if a MemoryException is raised I believe that is still a
> fundamental change in the documented contract of dictionary API. I don't
> believe there is a way to fix this without breaking someones
> application. The major differences I see between the two solutions is
> that counting will break people's applications who are otherwise
> following the documented api contract of dictionaries, and randomization
> will break people's applications who are violating the documented api
> contract of dictionaries.
>
> Personally I feel that the lesser of two evils is to reward those who
> followed the documentation, and not reward those who didn't.
>
> So +1 for Randomization as the only option in 3.3, and off by default
> with a flag or environment variable in bug fixes. I think it's the only
> way to proceed that won't hurt people who have followed the documented
> behavior.
+1
~Ethan~
More information about the Python-Dev
mailing list