MCPcopy Create free account
hub / github.com/numpy/numpy / attr

Function attr

tools/npy_tempita/__init__.py:470–480  ·  view source on GitHub ↗
(**kw)

Source from the content-addressed store, hash-verified

468
469
470def attr(**kw):
471 kw = list(iteritems(kw))
472 kw.sort()
473 parts = []
474 for name, value in kw:
475 if value is None:
476 continue
477 if name.endswith('_'):
478 name = name[:-1]
479 parts.append('%s="%s"' % (html_quote(name), html_quote(value)))
480 return html(' '.join(parts))
481
482
483class HTMLTemplate(Template):

Callers

nothing calls this directly

Calls 6

iteritemsFunction · 0.85
html_quoteFunction · 0.85
htmlClass · 0.85
sortMethod · 0.80
endswithMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected