◐ Shell
clean mode source ↗

Message 287595 - Python tracker

Confirmed that in Python 2.7 calling g() before and after modifying the dict prints 3 both times; calling g() before modifying the dict prints 3, then after modifying it prints 5.

Python 3.3 behaves like 2.7, so this sounds like a regression in 3.5 or maybe 3.4.