Skip to content

Python 3 Compatibility: xrange in mi.py #18

@nsadawi

Description

@nsadawi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions