Mercurial > public > mercurial-scm > hg
diff mercurial/templateutil.py @ 38283:0e0d03d09ecd
templater: rename mappable to hybriditem as it is the primary use case
This frees up the name 'mappable' for new interface type.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 09 Jun 2018 12:36:06 +0900 |
parents | 354fad8697fd |
children | e72697893c93 |
line wrap: on
line diff
--- a/mercurial/templateutil.py Fri Jun 08 23:32:33 2018 +0900 +++ b/mercurial/templateutil.py Sat Jun 09 12:36:06 2018 +0900 @@ -215,7 +215,7 @@ if util.safehasattr(val, '_makemap'): # a nested hybrid list/dict, which has its own way of map operation return val - return mappable(None, key, val, self._makemap) + return hybriditem(None, key, val, self._makemap) def itermaps(self, context): makemap = self._makemap @@ -243,7 +243,7 @@ for k, v in xs.iteritems()} return [unwrapvalue(context, mapping, x) for x in xs] -class mappable(wrapped): +class hybriditem(wrapped): """Wrapper for non-list/dict object to support map operation This class allows us to handle both: