You might want to check out PyLint, it should help catch gotchas like that: http://www.logilab.org/857
if you want to keep your code a little more concise 'self.content = content or []' also works just like the if block on most fairly recent versions of Python (definitely 2.5+, not sure about 2.4-). Not a big deal with one default value, but if you have 5 or 6 all those if blocks get in the way of readability.
if you want to keep your code a little more concise 'self.content = content or []' also works just like the if block on most fairly recent versions of Python (definitely 2.5+, not sure about 2.4-). Not a big deal with one default value, but if you have 5 or 6 all those if blocks get in the way of readability.