Avoid creating an invalid class name #3

Merged
merged 1 commit into from Dec 17, 2012
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Diff settings

Always

Just for now

View
@@ -644,7 +644,7 @@ def __str__(self): return self.respond()
if not isinstance(className, (types.NoneType, basestring)):
raise TypeError(errmsg % ('className', 'string or None'))
- className = re.sub(r'^_+','', className or moduleName)
+ className = re.sub(r'^_+([^0-9])',r'\1', className or moduleName)
if mainMethodName is Unspecified:
mainMethodName = klass._CHEETAH_defaultMainMethodNameForTemplates