pylops icon indicating copy to clipboard operation
pylops copied to clipboard

Protected members (and @property)?

Open mrava87 opened this issue 7 years ago • 2 comments

So far the convention of prepending _ to highlight protected members is not used. While no operator requires the user to change anything after initialization and its use is limited to * (or matvec) and .H (or rmatvec), it may be better to be consistent with common practice.

Also, in some cases some variables are checked at initialization, it may more natural to convert those into @property. This is not just a pure stylistic change but may make better code (although will raise the bar for new developers?)

mrava87 avatar Jan 09 '19 19:01 mrava87

Hi @mrava87 is this issue still open? I would like to work on this

dikwickley avatar Feb 13 '23 04:02 dikwickley

Hi, we have done this for the key class, LinearOperator. I am not so convinced it makes sense to do it for every single operator… I suggest not to work on this (I keep it open until we are sure we don’t want to make this happen in the long run either…)

mrava87 avatar Feb 13 '23 06:02 mrava87