Show
Ignore:
Timestamp:
03/08/04 21:13:25 (20 years ago)
Author:
jalet
Message:

Allow names to begin with a digit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/tool.py

    r1384 r1394  
    2222# 
    2323# $Log$ 
     24# Revision 1.78  2004/03/08 20:13:25  jalet 
     25# Allow names to begin with a digit 
     26# 
    2427# Revision 1.77  2004/03/03 13:10:35  jalet 
    2528# Now catches all smtplib exceptions when there's a problem sending messages 
     
    426429        asciiletters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' 
    427430        digits = '0123456789' 
    428         if name[0] in asciiletters : 
    429             validchars = asciiletters + digits + "-_." 
    430             for c in name[1:] : 
    431                 if c not in validchars : 
    432                     return 0 
    433             return 1         
    434         return 0 
     431        validchars = asciiletters + digits + "-_." 
     432        for c in name : 
     433            if c not in validchars : 
     434                return 0 
     435        return 1         
    435436         
    436437    def matchString(self, s, patterns) :