Convert underscore method to proper camelcase

This commit is contained in:
Ruud
2014-05-29 19:43:33 +02:00
parent 7ceb8dc79c
commit 6691c8ddd7
2 changed files with 12 additions and 5 deletions
+6
View File
@@ -307,3 +307,9 @@ def scanForPassword(name):
if m:
return m.group(1).strip('. '), m.group(2).strip()
under_pat = re.compile(r'_([a-z])')
def underscoreToCamel(name):
return under_pat.sub(lambda x: x.group(1).upper(), name)