2.5 compatibility.
Reduce memory usage on Python 2.