danielhomola/mifs

mifs breaks when using Python 3+

davidrpugh opened this issue · 9 comments

@danielhomola
In Python 3 it is not possible to compare an integer with a string as you are doing here. The result of this line will be a TypeError.

Hey David,

sorry about that and thanks a lot for point it out.. would you mind
proposing a solution and submitting a pull request for it?

cheers,
d

On 23 August 2016 at 14:03, David R. Pugh notifications@github.com wrote:

@danielhomola https://github.com/danielhomola
In Python 3 it is not possible to compare an integer with a string as you
are doing here
https://github.com/danielhomola/mifs/blob/master/mifs.py#L222. The
result of this line will be a TypeError.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3, or mute the thread
https://github.com/notifications/unsubscribe-auth/AFJk-8LLWO4fDaOPug1pJRo5egMGlobsks5qiu-QgaJpZM4Jq5f3
.

Daniel Homola

@danielhomola

I was emailed out of the blue by a user who wanted to know why the code didn't work on Python 3 and who wasn't able to raise an issue on GitHub directly (for whatever reason).

When I have some spare time I will try to submit a PR.

by a user?

On 24 August 2016 at 11:44, David R. Pugh notifications@github.com wrote:

@danielhomola https://github.com/danielhomola

I was emailed out of the blue by a user who wanted to know why the code
didn't work on Python 3 and who wasn't able to raise an issue on GitHub
directly (for whatever reason).

When I have some spare time I will try to submit a PR.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFJk-4vVPNu3Z5MpsV4s5KzHITsoLIacks5qjCB7gaJpZM4Jq5f3
.

Daniel Homola

@danielhomola

Yes, apparently you have some! Congrats.

My sarcasm-meter exploded :D anyway thanks a lot for pointing it out!

On 24 August 2016 at 13:50, David R. Pugh notifications@github.com wrote:

@danielhomola https://github.com/danielhomola

Yes, apparently you have some! Congrats.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFJk--pPqo6ubcd_NS7TM1enRllWRUwrks5qjD4KgaJpZM4Jq5f3
.

Daniel Homola

I am currently using it with Python 3, it turned out to be a problem with how the print statements changed and how xrange is no longer supported. I can submit a PR in a bit, though I will test it with Python 2 as well before submitting.

@xangma This issues would seem to be additional to the one that I reported.

@davidrpugh Fair enough, I did come up against the one you reported too, I just forget what caused it. Regardless, it's fixed for me (subject to consistency testing) ...

@davidrpugh Sorry, I see what you're getting at now. It's a problem with how Python 3 now performs comparisons (or rather, doesn't). Fixed