summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2013-05-14 09:03:16 -0400
committerLeonard Richardson <leonardr@segfault.org>2013-05-14 09:03:16 -0400
commitb5aad803f01aabf1ef89d3d50d24efdbe157010a (patch)
tree80d846649cf5d58f40c49b95ba9aadd0f6f18651 /doc
parentcab4e1708d6706d16ff31b25b2aef26e6ca15136 (diff)
downloadbeautifulsoup4-b5aad803f01aabf1ef89d3d50d24efdbe157010a.tar.gz
Added warning about using NavigableString outside of Beautiful Soup.
Diffstat (limited to 'doc')
-rw-r--r--doc/source/index.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/source/index.rst b/doc/source/index.rst
index b1cbd21..073fff3 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -455,6 +455,12 @@ them. In particular, since a string can't contain anything (the way a
tag may contain a string or another tag), strings don't support the
``.contents`` or ``.string`` attributes, or the ``find()`` method.
+If you want to use a ``NavigableString`` outside of Beautiful Soup,
+you should call ``unicode()`` on it to turn it into a normal Python
+Unicode string. If you don't, your string will carry around a
+reference to the entire Beautiful Soup parse tree, even when you're
+done using Beautiful Soup. This is a big waste of memory.
+
``BeautifulSoup``
-----------------