sckott / pytaxize

python port of taxize (taxonomy toolbelt) for R
https://sckott.github.io/pytaxize/
MIT License
34 stars 13 forks source link

Make use of dictionary keys() & values() compatible with Python 3 #46

Closed puppriss closed 5 years ago

puppriss commented 5 years ago

Indexing dictionary keys, e.g. dict.keys()[0], yields the Python3 error TypeError: 'dict_keys' object does not support indexing

Using list(dict.keys())[0] works in Py2 & 3

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 96


Totals Coverage Status
Change from base Build 94: 0.0%
Covered Lines:
Relevant Lines: 0

💛 - Coveralls
sckott commented 5 years ago

thanks @puppriss looks good. It probably makes sense to just drop support for python 2, yes? since python 2 is end of life soon https://pythonclock.org/

puppriss commented 5 years ago

@sckott yes that's probably the way forward, although it wouldn't change the fix in this particular case.

sckott commented 5 years ago

correct, wasn't saying it changes this PR, just curious if you agreed