diff options
Diffstat (limited to 'beautifulsoup/util.py')
-rw-r--r-- | beautifulsoup/util.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/beautifulsoup/util.py b/beautifulsoup/util.py index 693a7e2..5978865 100644 --- a/beautifulsoup/util.py +++ b/beautifulsoup/util.py @@ -9,17 +9,9 @@ except NameError: def isList(l): """Convenience method that works with all 2.x versions of Python to determine whether or not something is listlike.""" - return ((hasattr(l, '__iter__') and not isString(l)) + return ((hasattr(l, '__iter__') and not isinstance(l, basestring)) or (type(l) in (types.ListType, types.TupleType))) -def isString(s): - """Convenience method that works with all 2.x versions of Python - to determine whether or not something is stringlike.""" - try: - return isinstance(s, unicode) or isinstance(s, basestring) - except NameError: - return isinstance(s, str) - def buildSet(args=None): """Turns a list or a string into a set.""" if isinstance(args, str): |