MCPcopy
hub / github.com/Knio/dominate / attr

Function attr

dominate/dom_tag.py:494–502  ·  view source on GitHub ↗

Set attributes on the current active tag context

(*args, **kwargs)

Source from the content-addressed store, hash-verified

492
493
494def attr(*args, **kwargs):
495 '''
496 Set attributes on the current active tag context
497 '''
498 c = get_current()
499 dicts = args + (kwargs,)
500 for d in dicts:
501 for attr, value in d.items():
502 c.set_attribute(*dom_tag.clean_pair(attr, value))
503
504
505from . import util

Callers 2

test_filtersFunction · 0.85
test_attributesFunction · 0.85

Calls 3

get_currentFunction · 0.85
set_attributeMethod · 0.80
clean_pairMethod · 0.80

Tested by 2

test_filtersFunction · 0.68
test_attributesFunction · 0.68