Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Set the text value::
>>> doc.text('Youhou !')
[<div>]
>>> print(doc)
<div>Youhou !</div>
"""
if value is no_default:
if not self:
return ''
return ' '.join(
self._copy(tag).html() if tag.tag == 'textarea' else
extract_text(tag, **kwargs) for tag in self
)
for tag in self:
for child in tag.getchildren():
tag.remove(child)
tag.text = value
return self
</div>