mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-03-26 20:43:32 +01:00
Removing couple of "buildins" polyglot types
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import collections
|
||||
|
||||
from ebook_converter.polyglot.builtins import string_or_bytes
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
@@ -18,7 +16,7 @@ def is_iterable(obj):
|
||||
Strings, however, should be considered as atomic values to look up, not
|
||||
iterables.
|
||||
"""
|
||||
return hasattr(obj, '__iter__') and not isinstance(obj, string_or_bytes)
|
||||
return hasattr(obj, '__iter__') and not isinstance(obj, (str, bytes))
|
||||
|
||||
|
||||
class OrderedSet(collections.MutableSet):
|
||||
|
||||
Reference in New Issue
Block a user