diff options
| author | Stefan Behnel <stefan_ml@behnel.de> | 2014-12-06 21:05:00 +0100 |
|---|---|---|
| committer | Stefan Behnel <stefan_ml@behnel.de> | 2014-12-06 21:05:00 +0100 |
| commit | 8bbadc250fb838c79ad9dcce758befc1c4f30664 (patch) | |
| tree | 1106640e26846b9db2c6d145fd2d14affe6833be /src/lxml/html | |
| parent | 44ec7b535d1a342b3c4b6070ebd2a4c3e29595f7 (diff) | |
| download | python-lxml-8bbadc250fb838c79ad9dcce758befc1c4f30664.tar.gz | |
clarify docs: lxml.html.fragment_fromstring(create_parent=True) allows multiple elements as parse result
Diffstat (limited to 'src/lxml/html')
| -rw-r--r-- | src/lxml/html/__init__.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lxml/html/__init__.py b/src/lxml/html/__init__.py index a3ad82a7..95a0ab4c 100644 --- a/src/lxml/html/__init__.py +++ b/src/lxml/html/__init__.py @@ -666,11 +666,13 @@ def fragment_fromstring(html, create_parent=False, base_url=None, one element, or if anything but whitespace precedes or follows the element. - If create_parent is true (or is a tag name) then a parent node - will be created to encapsulate the HTML in a single element. In - this case, leading or trailing text is allowed. + If ``create_parent`` is true (or is a tag name) then a parent node + will be created to encapsulate the HTML in a single element. In this + case, leading or trailing text is also allowed, as are multiple elements + as result of the parsing. - base_url will set the document's base_url attribute (and the tree's docinfo.URL) + Passing a ``base_url`` will set the document's ``base_url`` attribute + (and the tree's docinfo.URL). """ if parser is None: parser = html_parser |
