From: <md...@us...> - 2007-08-28 19:49:33
|
Revision: 3746 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3746&view=rev Author: mdboom Date: 2007-08-28 12:49:29 -0700 (Tue, 28 Aug 2007) Log Message: ----------- A further optimization of the new dedent. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/cbook.py Modified: trunk/matplotlib/lib/matplotlib/cbook.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cbook.py 2007-08-28 19:20:08 UTC (rev 3745) +++ trunk/matplotlib/lib/matplotlib/cbook.py 2007-08-28 19:49:29 UTC (rev 3746) @@ -573,10 +573,11 @@ # beginning of each line. If it isn't in the cache, generate it. unindent = _dedent_regex.get(nshift, None) if unindent is None: - unindent = re.compile("\n\r?" + " ?" * nshift) + unindent = re.compile("\n\r? {0,%d}" % nshift) _dedent_regex[nshift] = unindent result = unindent.sub("\n", s).strip() + print result return result This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |