Consider making certain instance variables read-only properties #38
Labels
API
Related to outward-facing package usability fixes/enhancements
enhancement
New feature or request
Various classes in
dataset.py
use variables for things that shouldn't be changed by the user; changing them will either have no effect or a bad one. For example,EventArray
has.parent
,.dataset
,.session
,.hasSubchannels
,.hasMinMeanMax
,.allowMeanRemoval
,.channelId
,.subchannelId
, etc. I was going to list everything, but probably the majority of instance variables of classes indataset.py
should be read-only; it would be shorter to list the ones that shouldn't.In most cases, this would be a matter of something like renaming the variable with an underscore prefix and a property with the old name would just return that. Some internal changes would also be made so the class could access the underscore variable directly, saving an unnecessary function call.
The text was updated successfully, but these errors were encountered: