Some basic questions

Andrew Markebo andrew.markebo at telia.com
Thu Mar 27 04:40:25 EST 2003


| def isalpha(c, letters=re.compile('[a-zA-Z]')):
|     return letters.match(c) is not None

Is it just me putting the regexp compilation outside of the functions
using them?? Or it was just an example?

LettersRE=re.compile('[a-zA-Z]')
def isalpha(c):
     return LettersRE.match(c) is not None

     /Andy

-- 
 The eye of the beholder rests on the beauty!




More information about the Python-list mailing list