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

Python 3 incompatible #9

Open
louwersj opened this issue Jun 13, 2015 · 2 comments
Open

Python 3 incompatible #9

louwersj opened this issue Jun 13, 2015 · 2 comments

Comments

@louwersj
Copy link

It looks like some parts of the code are not able to work with the latest releases of Python.

below code is used in rake.py
sorted_keywords = sorted(keyword_candidates.iteritems(), key=operator.itemgetter(1), reverse=True)

However, iteritems() is no longer supported in python 3, this makes that the code cannot be used in the latest releases of Python.

@louwersj
Copy link
Author

To ensure it will work with python 3 you will need to write the line as shown in the example below:

sorted_keywords = sorted(iter(keyword_candidates.items()), key=operator.itemgetter(1), reverse=True)

@sfischer13
Copy link

#11 should fix this.

GerHobbelt pushed a commit to GerHobbelt/RAKE that referenced this issue May 23, 2024
Added setup.py to make module easily installable
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

2 participants