class MyApp:
x = byoc.param()
@x.get
def _(self, value):
pass
@x.set
def _(self, value):
pass
Right now I have:
class MyApp:
@byoc.param()
def x(self, value):
pass
But this only works for get, and I don't like to use is because it messes up the consistency with all the other params. This new syntax would be less obtrusive and could support more functions (e.g. cast() maybe).
One think to think about is that currently, the name of the method is significant. With this proposed syntax, it might not be.
Could I do something like this?
Right now I have:
But this only works for
get
, and I don't like to use is because it messes up the consistency with all the other params. This new syntax would be less obtrusive and could support more functions (e.g.cast()
maybe).One think to think about is that currently, the name of the method is significant. With this proposed syntax, it might not be.