You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call(
func=Name(id='fn', ctx=Load()),
args=[],
keywords=[
keyword(
arg='kwarg',
value=Constant(value=1))])
ExpressionContext.LOADName(
value='fn',
lpar=[],
rpar=[],
)
ExpressionContext.LOADName(
value='kwarg', # <---- does not match the behavior of the AST modulelpar=[],
rpar=[],
)
This came up while I was working on HypothesisWorks/hypothesis#4116, i.e. trying to turn undefined unqualified names in patches into the appropriate attribute access. In that context, it's quite surprising to see array=array(...) become np.array=np.array(...)!
It was easy enough to work around this once I worked out what was happening, but I think that the reasoning here (to honor ast implementation, we don’t assign context to attr) suggests that .keyword should not be assigned context either.
The text was updated successfully, but these errors were encountered:
This came up while I was working on HypothesisWorks/hypothesis#4116, i.e. trying to turn undefined unqualified names in patches into the appropriate attribute access. In that context, it's quite surprising to see
array=array(...)
becomenp.array=np.array(...)
!It was easy enough to work around this once I worked out what was happening, but I think that the reasoning here (to honor ast implementation, we don’t assign context to attr) suggests that
.keyword
should not be assigned context either.The text was updated successfully, but these errors were encountered: