diff options
-rw-r--r-- | bs4/__init__.py | 3 | ||||
-rw-r--r-- | bs4/util.py | 15 |
2 files changed, 1 insertions, 17 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py index e84e699..8baeec4 100644 --- a/bs4/__init__.py +++ b/bs4/__init__.py @@ -27,7 +27,6 @@ __all__ = ['BeautifulSoup'] import re -from util import buildSet from builder import builder_registry from dammit import UnicodeDammit from element import DEFAULT_OUTPUT_ENCODING, NavigableString, Tag @@ -145,7 +144,7 @@ class BeautifulSoup(Tag): if self.currentData: currentData = u''.join(self.currentData) if (currentData.translate(self.STRIP_ASCII_SPACES) == '' and - not buildSet([tag.name for tag in self.tagStack]).intersection( + not set([tag.name for tag in self.tagStack]).intersection( self.builder.preserve_whitespace_tags)): if '\n' in currentData: currentData = '\n' diff --git a/bs4/util.py b/bs4/util.py deleted file mode 100644 index 3cfeaf5..0000000 --- a/bs4/util.py +++ /dev/null @@ -1,15 +0,0 @@ -# Helper functions and mixin classes for Beautiful Soup - -import types -try: - set -except NameError: - from sets import Set as set - -def buildSet(args=None): - """Turns a list or a string into a set.""" - if isinstance(args, str): - return set([args]) - if args is None: - return set() - return set(args) |