Ok, I haven't seen the "mutable state objects" remark in the docs. Thanks !
This can be used in script to mutable reference.
However, this mutable objects will not be able to be persistent because no widget can store function right ?