MCPcopy Index your code
hub / github.com/python/cpython / set

Method set

Lib/xml/etree/ElementTree.py:347–355  ·  view source on GitHub ↗

Set element attribute. Equivalent to attrib[key] = value, but some implementations may handle this a bit more efficiently. *key* is what attribute to set, and *value* is the attribute value to set it to.

(self, key, value)

Source from the content-addressed store, hash-verified

345 return self.attrib.get(key, default)
346
347 def set(self, key, value):
348 """Set element attribute.
349
350 Equivalent to attrib[key] = value, but some implementations may handle
351 this a bit more efficiently. *key* is what attribute to set, and
352 *value* is the attribute value to set it to.
353
354 """
355 self.attrib[key] = value
356
357 def keys(self):
358 """Get list of attribute names.

Callers 4

test_attribMethod · 0.95
test_bug_xmltoolkit21Method · 0.95
test_bug_xmltoolkit39Method · 0.95
write_junitMethod · 0.95

Calls

no outgoing calls

Tested by 3

test_attribMethod · 0.76
test_bug_xmltoolkit21Method · 0.76
test_bug_xmltoolkit39Method · 0.76