to_string() method
setdefault() method
python 2.6 compat