mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-12-15 08:23:48 +03:00
generator: Simplify string concatentaion
by using ''.join() instead of concatenating string fragments in a loop, which is slower as it required re-hashing the string multiple times. Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
@@ -190,15 +190,11 @@ class docParser(xml.sax.handler.ContentHandler):
|
||||
self.function_return_info,
|
||||
self.function_return_field]
|
||||
elif tag == 'info':
|
||||
str = ''
|
||||
for c in self._data:
|
||||
str = str + c
|
||||
str = ''.join(self._data)
|
||||
if self.in_function == 1:
|
||||
self.function_descr = str
|
||||
elif tag == 'cond':
|
||||
str = ''
|
||||
for c in self._data:
|
||||
str = str + c
|
||||
str = ''.join(self._data)
|
||||
if self.in_function == 1:
|
||||
self.function_cond = str
|
||||
|
||||
|
||||
Reference in New Issue
Block a user