[
https://issues.apache.org/jira/browse/SYSTEMML-830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15399901#comment-15399901
]
Mike Dusenberry commented on SYSTEMML-830:
------------------------------------------
Fix added to {{master}} in [commit 60d000a |
https://github.com/apache/incubator-systemml/commit/60d000aa794e29b2acbba76a44f9b39b5c37d0a0],
and to {{branch-0.10}} in [commit 944c044 |
https://github.com/apache/incubator-systemml/commit/944c0445f87809cedf52f10c8712f9f716eee41f].
> Python API Broken In Python 3 Due To Changes In Dictionary Iteration
> --------------------------------------------------------------------
>
> Key: SYSTEMML-830
> URL: https://issues.apache.org/jira/browse/SYSTEMML-830
> Project: SystemML
> Issue Type: Bug
> Affects Versions: SystemML 0.10, SystemML 0.11
> Reporter: Mike Dusenberry
> Assignee: Mike Dusenberry
> Priority: Minor
>
> Currently, the {{executeScript(...)}} function in the Python API
> ({{SystemML.py}}) has a bug in Python 3 due to changes from Python 2 -> 3
> dealing with iteration over a dictionary. {{dictName.items()}} returned a
> list of the current items in the dictionary in Python 2, while it returns a
> live iterable in Python 3. The consequence is that a dictionary cannot be
> modified in a loop using {{dictName.items()}} in Python 3. This fix will
> simply force the iterable to a list in either Python version, as discussed in
> \[1]. We simply use this in the existing API for lightweight argument
> parsing, so performance is not a concern.
> \[1]: [PEP 0469 |
> http://legacy.python.org/dev/peps/pep-0469/#lists-as-mutable-snapshots]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)