Skip to content

exec can not add new local variables in Python 3 #611

@piyueh

Description

@piyueh

At line 173 and 175 of file pyclaw/fileio/netcdf.py, the use of exec to add new local variables doesn't seem to work in Python 3 (I'm using 3.7.1)

Python 2.7.15, however, does not have problems on these two execs (though Python 2.7.15 will encounter some other problems in the remaining code in netcdf.py).

This may have something to do with that, exec is a statement in Python 2 but is a function in Python 3. See the discussion here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions