Open martinpengellyphillips opened 8 years ago
I have a 'dict' like class that actually implements the Python collections.MutableMapping interface. However, pystache will not render templates correctly with this object as it is not considered a dict by the check in _get_value (https://github.com/defunkt/pystache/blob/master/pystache/context.py#L46).
collections.MutableMapping
dict
_get_value
At present I have resorted to also inheriting from dict in my class, but it would be good if this check could be improved (perhaps also test for Mapping interface conformity).
Mapping
Haha - so it seems I already have an open PR #144 to fix this issue. Any chance on getting it merged?
I have a 'dict' like class that actually implements the Python
collections.MutableMapping
interface. However, pystache will not render templates correctly with this object as it is not considered adict
by the check in_get_value
(https://github.com/defunkt/pystache/blob/master/pystache/context.py#L46).At present I have resorted to also inheriting from
dict
in my class, but it would be good if this check could be improved (perhaps also test forMapping
interface conformity).