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

bcftbx/simple_xls: fixes for Python2/3 compatibility #130

Merged
merged 7 commits into from Sep 13, 2019

Conversation

pjbriggs
Copy link
Member

PR which implements a number of updates to the bcftbx/simple_xls module for Python 2/3 compatibility:

  • Switch column sorting to use sorted(...,key=...)
  • Reimplement the column indices comparison function to drop the cmp builtin (which is unavailable in Python3)
  • Switch from xrange to Python3-compatible version of range
  • Implement the __bool__ method on the XLSStyle class in parallel with the existing __nonzero__ method
  • Implement the __next__ method on the ColumnRange iterator class in parallel with the existing next method
  • Fix the integer division operator (i.e. use // rather than /)

@pjbriggs pjbriggs merged commit 7ddca5d into devel Sep 13, 2019
@pjbriggs pjbriggs deleted the simple_xls-fixes-for-python3-compatibility branch September 13, 2019 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant