ansible-later/testenv/lib/python2.7/site-packages/pyrsistent/_compat.py

32 lines
521 B
Python
Raw Normal View History

2019-04-23 11:04:27 +00:00
from six import string_types
# enum compat
try:
from enum import Enum
except:
class Enum(object): pass
# no objects will be instances of this class
# collections compat
try:
from collections.abc import (
Container,
Hashable,
Iterable,
Mapping,
Sequence,
Set,
Sized,
)
except ImportError:
from collections import (
Container,
Hashable,
Iterable,
Mapping,
Sequence,
Set,
Sized,
)