diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-05-27 16:31:46 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-05-27 16:31:46 +0100 |
commit | a07484c1ce84fc63613cf70cde722dbafd396d74 (patch) | |
tree | 9e898f308619e7083e1446ec130a7a435fc84c49 /tools/libtpcodegen.py | |
parent | adba144b7fd16b83b28a3faae3b93b3984c54a2b (diff) | |
download | telepathy-glib-a07484c1ce84fc63613cf70cde722dbafd396d74.tar.gz |
Remove camelcase_to_lower, camelcase_to_upper
In the face of ambiguity, refuse the temptation to guess.
-Tim Peters, /The Python Way/ (see `python -c "import this"`)
Diffstat (limited to 'tools/libtpcodegen.py')
-rw-r--r-- | tools/libtpcodegen.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tools/libtpcodegen.py b/tools/libtpcodegen.py index 6391f1a48..e5114b7ab 100644 --- a/tools/libtpcodegen.py +++ b/tools/libtpcodegen.py @@ -29,32 +29,6 @@ NS_TP = "http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" _ASCII_ALNUM = ascii_letters + digits -def camelcase_to_lower(s): - out =""; - out += s[0].lower() - last_upper=False - if s[0].isupper(): - last_upper=True - for i in range(1,len(s)): - if s[i].isupper(): - if last_upper: - if (i+1) < len(s) and s[i+1].islower(): - out += "_" + s[i].lower() - else: - out += s[i].lower() - else: - out += "_" + s[i].lower() - last_upper=True - else: - out += s[i] - last_upper=False - return out - - -def camelcase_to_upper(s): - return camelcase_to_lower(s).upper() - - def cmp_by_name(node1, node2): return cmp(node1.getAttributeNode("name").nodeValue, node2.getAttributeNode("name").nodeValue) |