Skip to content

Refactor all member access to go through checkmember.py (meta issue) #7724

Closed
@ilevkivskyi

Description

@ilevkivskyi

There are bunch of places where we duplicate some parts of code for special logic in member access (such as properties, class methods, descriptors, __getattr__(), etc):

  • The checkmember.py itself
  • Override checks for variables
  • Override checks for methods
  • Multiple inheritance checks
  • Checks for special methods via check_op() and has_member()
  • Protocol implementation check

Here are some issues that will be solved (or significantly simplified) by refactoring this to go through the same place (probably checkmember.py):

Also I think having member access cleaned-up, centralized, and documented will open the way to finally solving #708 (currently the oldest high priority issue), and to having general support for descriptor protocol (for historical reasons, several things like properties are supported via some special-casing).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions