From: <fwi...@us...> - 2008-08-11 12:45:01
|
Revision: 5149 http://jython.svn.sourceforge.net/jython/?rev=5149&view=rev Author: fwierzbicki Date: 2008-08-11 12:44:54 +0000 (Mon, 11 Aug 2008) Log Message: ----------- Switch to for-each syntax in walker. Modified Paths: -------------- branches/asm/grammar/Python.g branches/asm/grammar/PythonWalker.g Modified: branches/asm/grammar/Python.g =================================================================== --- branches/asm/grammar/Python.g 2008-08-11 07:03:25 UTC (rev 5148) +++ branches/asm/grammar/Python.g 2008-08-11 12:44:54 UTC (rev 5149) @@ -178,7 +178,6 @@ import org.python.core.PyUnicode; import java.math.BigInteger; -import java.util.Iterator; } @members { Modified: branches/asm/grammar/PythonWalker.g =================================================================== --- branches/asm/grammar/PythonWalker.g 2008-08-11 07:03:25 UTC (rev 5148) +++ branches/asm/grammar/PythonWalker.g 2008-08-11 12:44:54 UTC (rev 5149) @@ -987,10 +987,8 @@ boolean extslice = false; if ($subscriptlist.isTuple) { sliceType[] st; - Iterator iter = sltypes.iterator(); List etypes = new ArrayList(); - while (iter.hasNext()) { - Object o = iter.next(); + for (Object o : sltypes) { if (o instanceof Index) { Index i = (Index)o; etypes.add(i.value); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |