The original logic is suspect. In particular, it decides not to write things out if it's explicitly set value == default but will write out all other of the attrs. I think it really wants to replace 264..270 w/ something like
``` python
       for key, value in attrs.items():
            if value and self._field_data.has(self, key):
                xml.set(key, unicode(value))
```