Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalise isinstance dict check #185

Open
martinpengellyphillips opened this issue May 18, 2016 · 1 comment
Open

Generalise isinstance dict check #185

martinpengellyphillips opened this issue May 18, 2016 · 1 comment

Comments

@martinpengellyphillips
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant