summaryrefslogtreecommitdiff
path: root/anchor.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2019-08-18 20:27:26 +0200
committerAnthon van der Neut <anthon@mnt.org>2019-08-18 20:27:26 +0200
commit6b2dce7c8a347b39ed09cb7ed48ae5613925c181 (patch)
treeb34e24d2fe8322e23a9085ddd63b3de4ad3da3b8 /anchor.py
parent90ce63fb8e053ee6a41c29c862b09cd65fad6e04 (diff)
downloadruamel.yaml-6b2dce7c8a347b39ed09cb7ed48ae5613925c181.tar.gz
allow list as typ argument for YAML()0.16.5
needed for extending the basic types e.g. in ruamel.yaml.pytypes
Diffstat (limited to 'anchor.py')
-rw-r--r--anchor.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/anchor.py b/anchor.py
index 4d77ad3..8d3c1ae 100644
--- a/anchor.py
+++ b/anchor.py
@@ -11,3 +11,7 @@ class Anchor(object):
# type: () -> None
self.value = None
self.always_dump = False
+
+ def __repr__(self):
+ ad = ", (always dump)" if self.always_dump else ""
+ return "Anchor({!r}{})".format(self.value, ad)