We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 905cf76 commit 5da065aCopy full SHA for 5da065a
1 file changed
v3/pg_encoder.py
@@ -82,7 +82,9 @@ def is_class(dat):
82
def is_instance(dat):
83
"""Return whether dat is an instance of a class."""
84
if is_python3:
85
- return isinstance(type(dat), type) and not isinstance(dat, type)
+ return type(dat) not in PRIMITIVE_TYPES and \
86
+ isinstance(type(dat), type) and \
87
+ not isinstance(dat, type)
88
else:
89
# ugh, classRE match is a bit of a hack :(
90
return type(dat) == types.InstanceType or classRE.match(str(type(dat)))
0 commit comments