What is the difference about ctrl.set(fn, clear=True), ctrl.set(fu) and ctrl.add(fn, clear=True) #668
Unanswered
MountainAndMorning
asked this question in
General
Replies: 1 comment
-
@ctrl.set("name")
def fn_0():
print("fn_0")
@ctrl.set("name")
def fn_1():
print("fn_1")
ctrl.name() # => fn_1 @ctrl.set("name")
def fn_0():
print("fn_0")
@ctrl.add("name")
def fn_2():
print("fn_2")
@ctrl.set("name")
def fn_1():
print("fn_1")
ctrl.name() # => fn_1, fn_2 @ctrl.set("name")
def fn_0():
print("fn_0")
@ctrl.add("name")
def fn_2():
print("fn_2")
ctrl.name() # => fn_0, fn_2 @ctrl.set("name")
def fn_0():
print("fn_0")
@ctrl.add("name", clear=True)
def fn_2():
print("fn_2")
ctrl.name() # => fn_2 @ctrl.add("name")
def fn_2():
print("fn_2")
@ctrl.set("name")
def fn_0():
print("fn_0")
ctrl.name() # => fn_0, fn_2 @ctrl.add("name")
def fn_2():
print("fn_2")
@ctrl.set("name", clear=True)
def fn_0():
print("fn_0")
ctrl.name() # => fn_0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think all of the three function calls would replace the older fn with the new one. I know it is wrong, but I do not understand its difference. Especially, If we call ctrl.set(fu) without clear, what happened about the older fn.
Beta Was this translation helpful? Give feedback.
All reactions