Revision: 4387
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4387&view=rev
Author:   mdboom
Date:     2007-11-20 05:13:22 -0800 (Tue, 20 Nov 2007)

Log Message:
-----------
Speed improvement initializing mathtext parser.

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/pyparsing.py

Modified: trunk/matplotlib/lib/matplotlib/pyparsing.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyparsing.py        2007-11-20 04:09:55 UTC 
(rev 4386)
+++ trunk/matplotlib/lib/matplotlib/pyparsing.py        2007-11-20 13:13:22 UTC 
(rev 4387)
@@ -2845,22 +2845,18 @@
     else:
         warnings.warn("Invalid argument to oneOf, expected string or list",
                 SyntaxWarning, stacklevel=2)
-        
+
+    symbols.sort(reverse=True)
     i = 0
     while i < len(symbols)-1:
         cur = symbols[i]
-        for j,other in enumerate(symbols[i+1:]):
+        for j, other in enumerate(symbols[i+1:]):
             if ( isequal(other, cur) ):
                 del symbols[i+j+1]
+            else:
                 break
-            elif ( masks(cur, other) ):
-                del symbols[i+j+1]
-                symbols.insert(i,other)
-                cur = other
-                break
-        else:
-            i += 1
-
+        i += 1
+    
     if not caseless and useRegex:
         #~ print strs,"->", "|".join( [ _escapeRegexChars(sym) for sym in 
symbols] )
         try:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to