From 6b2dce7c8a347b39ed09cb7ed48ae5613925c181 Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Sun, 18 Aug 2019 20:27:26 +0200 Subject: allow list as typ argument for YAML() needed for extending the basic types e.g. in ruamel.yaml.pytypes --- anchor.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'anchor.py') 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) -- cgit v1.2.1