Merge pull request #4327 from ndevenish/approx

Let approx() work on more generic sequences
This commit is contained in:
Ronny Pfannschmidt
2018-12-17 15:21:12 +01:00
committed by GitHub
5 changed files with 24 additions and 6 deletions

View File

@@ -45,11 +45,11 @@ MODULE_NOT_FOUND_ERROR = "ModuleNotFoundError" if PY36 else "ImportError"
if _PY3:
from collections.abc import MutableMapping as MappingMixin
from collections.abc import Mapping, Sequence
from collections.abc import Iterable, Mapping, Sequence, Sized
else:
# those raise DeprecationWarnings in Python >=3.7
from collections import MutableMapping as MappingMixin # noqa
from collections import Mapping, Sequence # noqa
from collections import Iterable, Mapping, Sequence, Sized # noqa
if sys.version_info >= (3, 4):