Repository navigation
Conversation
|
It wasn't raising an error. 😜 |
|
It looks like there's also already an abandoned PR for this at #3505 |
|
Yeah, I saw that :) |
|
Assert statement passes but col just takes up mask and doesn't raise an error. |
There was a problem hiding this comment.
You mean __setattr__.
That said, I'm not sure overriding __setattr__ is the best approach to this, since it will slow down all attribute access (granted, by a only a small amount).
Instead I think the Column class could get a .mask property defined to raise an exception:
@property
def mask(self):
raise AttributeError('mask')
Should see what @taldcroft thinks though.
There was a problem hiding this comment.
On the other hand, if a @property is used then it will look on dir() like non-masked columns have a "mask" attribute so that could be confusing after all.
On the third hand, I'm not sure this shouldn't go on BaseColumn since we would want this behavior for any column that doesn't have a mask attribute.
Maybe something like if not hasattr(self, 'mask'): raise AttributeError(...)
|
Oh, I'll fix that :) |
|
I tried by creating a mask property as suggested by @embray in column class and also tried : if hasattr(self, 'mask'): raise AttributeError('mask')Both methods were generating around 700+ errors. |
|
Incorrect implementation. |
#3505