If you use your own comparaison function (__eq__) for objects used as
dict keys, you may now get RuntimeError with Python 3.3 if the dict is
modified during a dict lookup in a multithreaded application. You
should use a lock on the dict to avoid this exception.

Said differently, a dict lookup is not atomic if you use your own
types as dict keys and these types implement __eq__.

In Python < 3.3, the dict lookup is retried until the dict is no more
modified during the lookup, which leads to a stack overflow crash if
the dict is always modified.

See the issue #14205 for the rationale.

Victor
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to