mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-28 04:07:46 +00:00
ubuiltins: Document setattr.
This commit is contained in:
@@ -1067,9 +1067,16 @@ def round(*args):
|
||||
|
||||
def setattr(object: Any, name: _str, value: Any) -> None:
|
||||
"""
|
||||
Assigns the value to the attribute, provided the object allows it.
|
||||
setattr(object, name, value)
|
||||
|
||||
Assigns a value to an attribute, provided that the object allows it.
|
||||
|
||||
This is the counterpart of :meth:`getattr`.
|
||||
|
||||
Arguments:
|
||||
object: Object in which to store the attribute.
|
||||
name (str): Name of the attribute.
|
||||
value: Value to store.
|
||||
"""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user