Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 4111 by [email protected]: uses of iteritems should be removed
http://code.google.com/p/sympy/issues/detail?id=4111
OK, we don't use 2to3...but there are several uses of iteritems still in
the codebase that will fail, then, in Python 3x. These must be uncovered
lines which don't cause anybody trouble if they aren't running in 3. We
should clean them up, though, shouldn't we?
C:\Users\chris.smith\sympy\doc\ext\docscrape.py (1 hits)
Line 379: for section, references in idx.iteritems():
C:\Users\chris.smith\sympy\doc\ext\docscrape_sphinx.py (1 hits)
Line 138: for section, references in idx.iteritems():
C:\Users\chris.smith\sympy\sympy\core\compatibility.py (1 hits)
Line 542: return 1 + sum(_nodes(k) + _nodes(v) for k, v in
e.iteritems())
C:\Users\chris.smith\sympy\sympy\functions\elementary\trigonometric.py (1
hits)
Line 585: a = [n//x**y for x, y in
factorint(r.q).iteritems()]
C:\Users\chris.smith\sympy\sympy\polys\polycontext.py (1 hits)
Line 43: [ '%s=%r' % (key, value) for key, value in
self.__options__.iteritems() ])
In this file, a workaround is given by not using the attribute, but bu
defining a 2x or 3x compatible function, `iteritems`:
C:\Users\chris.smith\sympy\sympy\mpmath\calculus\differentiation.py (7
hits)
Line 5: iteritems = dict.iteritems
Line 7: iteritems = dict.items
Line 372: R = dict((c+(0,),v) for (c,v) in iteritems(R))
Line 374: for powers, count in iteritems(R):
Line 380: for powers, count in iteritems(R):
Line 443: for powers, c in iteritems(dpoly(i)):
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.