summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-09-21 01:31:53 +0900
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-09-21 01:31:53 +0900
commit28f84ab3d9ff451af717fdf132b1a2a4bf4e0e52 (patch)
tree95303c4b0259e5f9fc96d8f9f4938e8a7831e068
parent813b45adede211e71bafce984deda2b4fda01ee8 (diff)
downloadslixmpp-28f84ab3d9ff451af717fdf132b1a2a4bf4e0e52.tar.gz
slixmpp-28f84ab3d9ff451af717fdf132b1a2a4bf4e0e52.tar.bz2
slixmpp-28f84ab3d9ff451af717fdf132b1a2a4bf4e0e52.tar.xz
slixmpp-28f84ab3d9ff451af717fdf132b1a2a4bf4e0e52.zip
ElementBase: Remove support for TitleCase methods.
This gains about 1/8th of the time spent in __getitem__.
-rw-r--r--slixmpp/xmlstream/stanzabase.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/slixmpp/xmlstream/stanzabase.py b/slixmpp/xmlstream/stanzabase.py
index 24e4e3ef..8023831b 100644
--- a/slixmpp/xmlstream/stanzabase.py
+++ b/slixmpp/xmlstream/stanzabase.py
@@ -668,9 +668,6 @@ class ElementBase(object):
if hasattr(self, get_method):
return getattr(self, get_method)(**kwargs)
- get_method2 = "get%s" % attrib.title()
- if hasattr(self, get_method2):
- return getattr(self, get_method2)(**kwargs)
else:
if attrib in self.sub_interfaces:
return self._get_sub_text(attrib, lang=lang)
@@ -733,7 +730,6 @@ class ElementBase(object):
if attrib in self.interfaces or attrib == 'lang':
if value is not None:
set_method = "set_%s" % attrib.lower()
- set_method2 = "set%s" % attrib.title()
if self.plugin_overrides:
name = self.plugin_overrides.get(set_method, None)
@@ -746,8 +742,6 @@ class ElementBase(object):
if hasattr(self, set_method):
getattr(self, set_method)(value, **kwargs)
- elif hasattr(self, set_method2):
- getattr(self, set_method2)(value, **kwargs)
else:
if attrib in self.sub_interfaces:
if lang == '*':
@@ -820,7 +814,6 @@ class ElementBase(object):
if attrib in self.interfaces or attrib == 'lang':
del_method = "del_%s" % attrib.lower()
- del_method2 = "del%s" % attrib.title()
if self.plugin_overrides:
name = self.plugin_overrides.get(del_method, None)
@@ -833,8 +826,6 @@ class ElementBase(object):
if hasattr(self, del_method):
getattr(self, del_method)(**kwargs)
- elif hasattr(self, del_method2):
- getattr(self, del_method2)(**kwargs)
else:
if attrib in self.sub_interfaces:
return self._del_sub(attrib, lang=lang)