summaryrefslogtreecommitdiff
path: root/representer.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2016-11-16 16:07:00 +0100
committerAnthon van der Neut <anthon@mnt.org>2016-11-16 16:07:00 +0100
commitf04d175691344100515d8db900f3e6a3208c6d9e (patch)
tree207abd990409e3148871b6a4ecf52fdf19bcbb3a /representer.py
parent728a060efbec0ccf1e968cddf8994aa5d197f55e (diff)
downloadruamel.yaml-f04d175691344100515d8db900f3e6a3208c6d9e.tar.gz
this should fix #75: continuing problems with numpy0.12.18
Diffstat (limited to 'representer.py')
-rw-r--r--representer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/representer.py b/representer.py
index 56890b3..2d82cf7 100644
--- a/representer.py
+++ b/representer.py
@@ -200,7 +200,7 @@ class SafeRepresenter(BaseRepresenter):
# https://docs.python.org/3/reference/expressions.html#parenthesized-forms :
# "i.e. two occurrences of the empty tuple may or may not yield the same object"
# so "data is ()" should not be used
- if data is None or data == ():
+ if data is None or (isinstance(data, tuple) and data == ()):
return True
if isinstance(data, (binary_type, text_type, bool, int, float)):
return True