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

Corrected ParserReflect.get_pfunctions on Python 3 #71

Merged
merged 2 commits into from
Aug 25, 2015

Conversation

moses-palmer
Copy link
Contributor

When p functions from different modules share the same line number, the call to p_functions.sort will compare module instances. This is not supported in Python 3 and will rause TypeError.

This branch fixes this error by converting modules to strs in the sort key argument.

This test uses a grammar split into several modules, where the
line number of rules are the same in more than one module. This
will cause ParserReflect.get_pfunctions to try to sort tuples
on module items, which are unsortable in Python 3.
dabeaz added a commit that referenced this pull request Aug 25, 2015
Corrected ParserReflect.get_pfunctions on Python 3
@dabeaz dabeaz merged commit 50e6b9d into dabeaz:master Aug 25, 2015
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

Successfully merging this pull request may close these issues.

2 participants