diff mercurial/templater.py @ 38226:7824783a6d5e

templater: add wrapped types for pure non-list/dict values These wrapper types will allow us to get rid of some isinstance() business. A bytes object needs to support sequence-like operations (e.g. join(), ifcontains(), etc.) That's why we have two wrapper classes. Tests will be added later.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 20 Mar 2018 23:56:26 +0900
parents d48b80d58848
children 0e0d03d09ecd
line wrap: on
line diff
--- a/mercurial/templater.py	Wed Apr 04 21:06:14 2018 +0900
+++ b/mercurial/templater.py	Tue Mar 20 23:56:26 2018 +0900
@@ -32,6 +32,9 @@
 True, False, int, float
     can be stringified as such.
 
+wrappedbytes, wrappedvalue
+    a wrapper for the above printable types.
+
 date tuple
     a (unixtime, offset) tuple, which produces no meaningful output by itself.