1
0
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:
2020-04-20 20:22:50 +02:00
parent eac0b98d6f
commit c867f0321b
36 changed files with 85 additions and 109 deletions

View File

@@ -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):