We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See the setter for labels below
labels
k2/k2/python/k2/fsa.py
Lines 440 to 441 in 2537a3f
Because of the presence of the following function
Line 372 in 2537a3f
fsa.labels = xxx is always dispatched to fsa.__setattr__, so we can actually remove @labels.setter since it is never called.
fsa.labels = xxx
fsa.__setattr__
@labels.setter
A minimal example to illustrate the issue is given below
#!/usr/bin/env python3 class Foo: @property def bar(self): return 10 @bar.setter def bar(self, value): print("set bar") def __setattr__(self, name, value): print(f"set attr: {name}") f = Foo() print("f.bar", f.bar) f.bar = 100
The output is
f.bar 10 set attr: bar
The text was updated successfully, but these errors were encountered:
Closed via #850
Sorry, something went wrong.
No branches or pull requests
See the setter for
labels
belowk2/k2/python/k2/fsa.py
Lines 440 to 441 in 2537a3f
Because of the presence of the following function
k2/k2/python/k2/fsa.py
Line 372 in 2537a3f
fsa.labels = xxx
is always dispatched tofsa.__setattr__
, so we can actually remove@labels.setter
since it is never called.A minimal example to illustrate the issue is given below
The output is
The text was updated successfully, but these errors were encountered: