Python not that wierd

Cliff Crawford cjc26 at nospam.cornell.edu
Tue Aug 1 22:26:55 EDT 2000


* Alex Martelli <alex at magenta.com> menulis:
| 
| I.e., I suspect a more efficacious R.E. for your match might be:
|     if not self.compiled_re:
|         self.compiled_re = re.compile(r'(\d*)[dD](\d*)([-+]\d+)?$')
|     diematch = re.match(self.compiled_re,self.diecode)

Oops, that should be

      diematch = self.compiled_re.match(self.diecode)

re.match only takes strings for its pattern argument, not compiled
regexps.


-- 
cliff crawford    -><-    http://www.people.cornell.edu/pages/cjc26/
                         "But why is it TILED?!?"      icq 68165166



More information about the Python-list mailing list