MCPcopy Index your code
hub / github.com/webpy/webpy / __init__

Method __init__

web/form.py:183–199  ·  view source on GitHub ↗
(self, name, *validators, **attrs)

Source from the content-addressed store, hash-verified

181 """
182
183 def __init__(self, name, *validators, **attrs):
184 self.name = name
185 self.validators = validators
186 self.attrs = attrs = AttributeList(attrs)
187
188 self.type = attrs.pop("type", None)
189 self.description = attrs.pop("description", name)
190 self.value = attrs.pop("value", None)
191 self.pre = attrs.pop("pre", "")
192 self.post = attrs.pop("post", "")
193 self.note = None
194
195 self.id = attrs.setdefault("id", self.get_default_id())
196
197 if "class_" in attrs:
198 attrs["class"] = attrs["class_"]
199 del attrs["class_"]
200
201 def is_hidden(self):
202 return False

Callers

nothing calls this directly

Calls 4

get_default_idMethod · 0.95
AttributeListClass · 0.85
popMethod · 0.80
setdefaultMethod · 0.80

Tested by

no test coverage detected