summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-05-21 11:15:12 -0400
committerLeonard Richardson <leonard.richardson@canonical.com>2011-05-21 11:15:12 -0400
commit640fdc0fa7f2ffd53fb92dbeac8b456bb09dcaa7 (patch)
tree59b0c7e7dd36f9aa0afd2e632778620ff3aa82ce
parentf7e49815dfcd427af639b1e3f9aefcf4f8f581e4 (diff)
got rid of util.py altogether.
-rw-r--r--bs4/__init__.py3
-rw-r--r--bs4/util.py15
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)