@contents.setter<EOL><INDENT>def contents(self, contents: str) -> None:<DEDENT>
match = self._match<EOL>start, end = match.span('<STR_LIT>')<EOL>if start != -<NUM_LIT:1>:<EOL><INDENT>self[start:end] = contents<EOL><DEDENT>else:<EOL><INDENT>s, e = match.span('<STR_LIT>')<EOL>self[s:e] = '<STR_LIT>'.format(contents, match['<STR_LIT:name>'].decode())<EOL><DEDENT>
Set new contents.

        Note that if the tag is self-closing, then it will be expanded to
        have a start tag and an end tag. For example:
        >>> t = Tag('<t/>')
        >>> t.contents = 'n'
        >>> t.string
        '<t>n</t>'