MCPcopy Create free account
hub / github.com/ActiveState/code / List

Function List

recipes/Python/502222_Creating_javclass/recipe-502222.py:66–71  ·  view source on GitHub ↗

create html ul from list with class cls

(lst, type_, **kwargs)

Source from the content-addressed store, hash-verified

64 return result
65
66def List(lst, type_, **kwargs):
67 """create html ul from list with class cls"""
68 result = ['<%s %s>' % (type_, atributes(**kwargs))]
69 result += [(' '*4) + tag('li', elem) for elem in lst]
70 result += ['</%s>' % (type_)]
71 return result
72
73def classLink(className, string_):
74 """return copy of string with className replaced by HTML link to it."""

Callers 1

packageToHmtlFunction · 0.85

Calls 2

atributesFunction · 0.85
tagFunction · 0.70

Tested by

no test coverage detected