MCPcopy Create free account
hub / github.com/pywebio/PyWebIO / __setattr__

Method __setattr__

pywebio/pin.py:310–316  ·  view source on GitHub ↗

__setattr__ will be invoked regardless of whether the attribute be found

(self, name: str, value)

Source from the content-addressed store, hash-verified

308 return _get_pin_value(name, self._strict)
309
310 def __setattr__(self, name: str, value):
311 """
312 __setattr__ will be invoked regardless of whether the attribute be found
313 """
314 assert name != 'use_strict', "'use_strict' is a reserve name, can't use as pin widget name"
315 check_dom_name_value(name, 'pin `name`')
316 self.__setitem__(name, value)
317
318 def __setitem__(self, name: str, value):
319 send_msg('pin_update', spec=dict(name=name, attributes={"value": value}))

Callers 1

use_strictMethod · 0.45

Calls 2

__setitem__Method · 0.95
check_dom_name_valueFunction · 0.85

Tested by

no test coverage detected