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

control setting nodes as local outside of the constructor #2588

Merged

Commits on Sep 30, 2024

  1. control setting nodes as local outside of the constructor

    1. The main reason is that a node might be assigned to its parent via
       an «alias»:
    
    Sometimes a class accesses a member by a different name than
       "__name__" of that member: in pypy3 `list.__mul__.__name__ ==
       "__rmul__"`.
    
    As a result, in the example above we weren't able to find
       "list.__mul__", because it was recorded only as "list.__rmul__".
    
    2. Sometimes we want to have a parent semantically, but we don't want
       to add it to the list of locals. For example, when inferring
       properties we are creating ad-hoc properties. We wouldn't want to
       add another symbol to the locals every time we do an
       inference. (actually, there's a very good question as to why we are
       doing those ad-hoc properties but that's out of scope)
    
    it's a part of the campaign to get rid of non-module roots
    temyurchenko committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    5317309 View commit details
    Browse the repository at this point in the history
  2. update changelog

    temyurchenko committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    579f7a9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    87305dc View commit details
    Browse the repository at this point in the history