Skip to content
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

ComprehensionLoopNode target/iterator attributes transposed #196

Open
graingert opened this issue Feb 12, 2020 · 0 comments
Open

ComprehensionLoopNode target/iterator attributes transposed #196

graingert opened this issue Feb 12, 2020 · 0 comments

Comments

@graingert
Copy link
Member

ComprehensionLoopNode target/iterator attributes transposed

actual

In [112]: RedBaron("[x for y in z]")[0].generators[0].help(deep=True)
ComprehensionLoopNode()
  # identifiers: comprehension_loop, comprehension_loop_, comprehensionloop, comprehensionloopnode
  iterator ->
    NameNode()
      # identifiers: name, name_, namenode
      value='y'
  target ->
    NameNode()
      # identifiers: name, name_, namenode
      value='z'
  ifs ->

expected

In [112]: RedBaron("[x for y in z]")[0].generators[0].help(deep=True)
ComprehensionLoopNode()
  # identifiers: comprehension_loop, comprehension_loop_, comprehensionloop, comprehensionloopnode
  target ->
    NameNode()
      # identifiers: name, name_, namenode
      value='y'
  iterator ->
    NameNode()
      # identifiers: name, name_, namenode
      value='z'
  ifs ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant