scyjava icon indicating copy to clipboard operation
scyjava copied to clipboard

Allow @constant to apply constants to other modules

Open gselzer opened this issue 2 years ago • 1 comments

I am finding myself duplicating the constant function to our other python components. This is WET.

It would be cool if, in imglyb, we could write

@scyjava.constant
def some_constant():
  return "the constant"

And then access it with imglyb.some_constant.

gselzer avatar Jun 07 '22 18:06 gselzer

This may be of help: https://mail.python.org/pipermail/python-dev/2008-January/076194.html

gselzer avatar Jun 07 '22 18:06 gselzer