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

MRS codecs should use the Mrs() constructor #103

Closed
goodmami opened this issue Apr 17, 2017 · 0 comments
Closed

MRS codecs should use the Mrs() constructor #103

goodmami opened this issue Apr 17, 2017 · 0 comments
Milestone

Comments

@goodmami
Copy link
Member

There's an asymmetry between the mrs() and eds() methods on ParseResults:

>>> r = rest.parse('Dogs bark.', params={'mrs':'simple', 'eds':'native'})
>>> r.result(0).eds().to_dict()
{ ... }
>>> r.result(0).mrs().to_dict()
...
AttributeError: 'Xmrs' object has no attribute 'to_dict'

This is because the underlying codec for mrs(), simplemrs, instantiates Xmrs instead of Mrs(). Changing this should allow the ParseResult calls to be symmetric, and is probably the better thing to do anyway. Similarly, check that the other codecs instantiate their respective classes instead of the generic one.

@goodmami goodmami added this to the v0.7.0 milestone Apr 17, 2017
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