Fixed comparison to () (closes #64).
diff --git a/lib/yaml/representer.py b/lib/yaml/representer.py
index 1e9fa30..4ea8cb1 100644
--- a/lib/yaml/representer.py
+++ b/lib/yaml/representer.py
@@ -139,7 +139,9 @@
class SafeRepresenter(BaseRepresenter):
def ignore_aliases(self, data):
- if data is None or data is ():
+ if data is None:
+ return True
+ if isinstance(data, tuple) and data == ():
return True
if isinstance(data, (str, unicode, bool, int, float)):
return True
diff --git a/lib3/yaml/representer.py b/lib3/yaml/representer.py
index 33ce9e8..bd22842 100644
--- a/lib3/yaml/representer.py
+++ b/lib3/yaml/representer.py
@@ -132,7 +132,9 @@
class SafeRepresenter(BaseRepresenter):
def ignore_aliases(self, data):
- if data is None or data is ():
+ if data is None:
+ return True
+ if isinstance(data, tuple) and data == ():
return True
if isinstance(data, (str, bytes, bool, int, float)):
return True