Closed frmdstryr closed 4 years ago
I would argue that this is general true in Python. You can do whatever you want in a subclass, I am not sure that enaml should be deviate from that.
Maybe an alternative to making it final would be to emit some warnings to a logger when it's overridden? I'm not sure how frequently this is actually done purposefully.
Another thought I had was having the ability to pass "compiler options" for things like this to enaml.imports()
? Eg like a strict mode or something which didn't allow overriding stuff.
I shot myself in the foot with this too often... can
attr
be changed to always be final so overriding it is an error unless it's somehow explicitly marked as overriding?I don't want this
But maybe this