Adding support for executing attribute/query calls without assigning to a prior variable#2337
Conversation
|
Converting to draft as few corner cases need to be checked and the |
|
The |
|
Thanks! I need to think about if this is the right way to fix it. It seems to be adding symbolics stuff into the frontend at places where maybe it shouldn't belong. I'll get back to you. |
|
Yeah I sometimes was suspecting if this is moving in the wrong place but then let's say we have
I think so we could stick to this but I am also not sure if we could do better ! |
|
@czgdp1807, @Thirumalai-Shaktivel, @Shaikh-Ubaid any ideas how to best support this? We want to support custom SymPy methods, but do not want to pollute the frontend at the wrong places. I think this is similar to custom NumPy methods that we support (or will support). |
|
As Anutosh said, the constant like pi will be treated as variable and it is not declared in current scope, the same goes for function call as well.
|
certik
left a comment
There was a problem hiding this comment.
I don't know how to improve it. We need this feature, so let's merge this for now. We might need to improve it later, once we know how.
I realize that we couldn't access attributes or query methods without assigning the expression to a variable beforehand.
So this works
But these cases don't