New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Row.__getattr__ raises AttributeError when trying to access '_extra' #229
Comments
Can you double check with https://github.com/web2py/pydal/tree/v15.05.29? |
I see, however it is strange that tests are still passing, probably they are not enough. |
@ilvalle maybe depends on how attributes are added as normal keys or under |
Is it still valid? Can you provide a failing example? |
I think |
Update: actually I've re-tested this with latest master. The issue will show up only if you try to access something inside >>> row['_extra']['asd']
'lol'
>>> row['asd']
'lol'
>>> row._extra.asd
'lol'
>>> row.asd
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/sellf/pydal/pydal/helpers/classes.py", line 348, in __getattr__
raise AttributeError
AttributeError Now, since in |
I don't think is documented anywhere Paolo 2015-07-02 10:42 GMT+02:00 Giovanni Barillari notifications@github.com:
|
@mdipierro I'm gonna close this as invalid. Feel free to re-open if you think is a valid bug. |
@ilvalle hints on how to solve this? |
Although theory I agree that__getattr__ should behave as getitem, in practice they did not. This is because in |
According to my test, we have better performance now. |
OK. As long as performance was tested I think the code is fine as it is now. Can we close this issue? |
@mdipierro don't close this until we successfully decided how to manage this. #246 is a duplicated and a consequence of this. |
For me is ok, if it doesn't decrease the overall performance. Paolo 2015-07-08 22:00 GMT+02:00 Giovanni Barillari notifications@github.com:
|
Just spotted. I have this
Row
returned from pyDAL:In v15.03 was working as expected. In current master the problem seems caused by the difference behavior between
Row.__getitem__
andRow.__getattr__
.@ilvalle maybe a consequence of your refactoring with
BasicStorage
?I propose to add a:
in
Row
class.The text was updated successfully, but these errors were encountered: