summaryrefslogtreecommitdiff
path: root/bs4/__init__.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2015-06-25 20:53:13 -0400
committerLeonard Richardson <leonardr@segfault.org>2015-06-25 20:53:13 -0400
commit0b9b0976b5219233bee143c09a3f35fc2a44d20e (patch)
treedf6061527e52417c035b9eb72bd41962df1c3a44 /bs4/__init__.py
parentfdc2bf6d1490d536fb583986b40a34f80ed5a0bc (diff)
You can now create a NavigableString or a subclass just by invoking
the constructor. [bug=1294315]
Diffstat (limited to 'bs4/__init__.py')
-rw-r--r--bs4/__init__.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py
index c78c54e..4b92152 100644
--- a/bs4/__init__.py
+++ b/bs4/__init__.py
@@ -241,9 +241,7 @@ class BeautifulSoup(Tag):
def new_string(self, s, subclass=NavigableString):
"""Create a new NavigableString associated with this soup."""
- navigable = subclass(s)
- navigable.setup()
- return navigable
+ return subclass(s)
def insert_before(self, successor):
raise NotImplementedError("BeautifulSoup objects don't support insert_before().")