mifs icon indicating copy to clipboard operation
mifs copied to clipboard

Python 3 Compatibility: xrange in mi.py

Open nsadawi opened this issue 8 years ago • 1 comments

Hi @danielhomola, Congrats on passing your PhD viva .. well done! Many thanks for putting this together, it's really useful I have tried to use mifs using python 3.5 and it complained that it does not recognise xrange in mi.py. https://github.com/danielhomola/mifs/blob/master/mifs/mi.py#L56

I have resolved this by defining xrange in mi.py as:

def xrange(*args, **kwargs):
      return iter(range(*args, **kwargs))

This was based on this answer: https://stackoverflow.com/a/34950015

It also complained about the parentheses for print

Best wishes, Noureddin

nsadawi avatar Dec 09 '17 11:12 nsadawi

Can you please try the latest version of the code and report back if you still encounter the bug? Thanks!

danielhomola avatar Feb 18 '18 19:02 danielhomola