Python 3 features not used in modules

Issue #202 resolved
Keith O'Hara created an issue

/ is not floating point division when used in modules

print is not a function when used in modules

Comments (5)

  1. Doug Blank

    Workaround:

    from __future__ import print_function, division, with_statement
    

    But we can't do this for all imports, because IronPython uses the standard library of Python2.

    As soon as IronPython becomes Python3 compatible, we will switch.

  2. Doug Blank

    I don't think we should change the semantics in backwards incompatible way after having Calico Python work this way since the beginning.

    I think we should have a "Python3 compatibility mode" option for Python that is initially checked. It is easy to add this--- a couple lines of code.

  3. Doug Blank

    Added "Python2 Mode" for Python (available under menu -> Script -> Options) when Python is active.

    It might be nice to add a method to change this from a notebook...

    Good enough, until IronPython moves to Python3?

  4. Log in to comment