defunkt / pystache

Mustache in Python
http://mustache.github.com/
MIT License
1.31k stars 308 forks source link

Generalise isinstance dict check #185

Open martinpengellyphillips opened 8 years ago

martinpengellyphillips commented 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).

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).

martinpengellyphillips commented 8 years ago

Haha - so it seems I already have an open PR #144 to fix this issue. Any chance on getting it merged?