Yuya Nishihara <yuya@tcha.org> [Fri, 23 Mar 2018 21:40:16 +0900] rev 37278
templater: extract private function to evaluate generator to byte string
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 23:14:21 +0900] rev 37277
templater: pass (context, mapping) down to unwrapvalue()
The same reason as why I made unwraphybrid() take a (context, mapping) pair.
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Mar 2018 20:58:28 +0900] rev 37276
templater: drop unneeded generator from mappable object
Per the definition of the show() interface, it can return a bytes.
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Mar 2018 20:56:42 +0900] rev 37275
templater: mark .gen as a private attribute
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 00:11:36 +0900] rev 37274
templatekw: do not directly call .gen
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Mar 2018 20:52:50 +0900] rev 37273
templater: define interface for objects requiring unwraphybrid()
Prepares for introducing another hybrid-like data type. show() takes context
as an argument so a wrapper class may render its items by pre-configured
template:
def show(self, context, mapping):
return (context.expand(self._tmpl, mapping + lm) for lm in self._mappings)