Now that we have more fully implemented generics, we can leverage this logic to more fully implement the datamodel of Python.
This means that when calling methods, we check the loaded Python classes instead of implementing special logic in the type checker.
We then match methods and their types.
High-level description of the feature
Call the proper magic methods of Python.
We already make use of for instance:
__iter__()
__getitem__(self, item) (#438 )
__str__()
Up until now, this was done on a as-needed basis.
However, a more exhaustive implementation is possible now thanks to the now more comprehensive generic implementation.
Current Issue
Now that we have more fully implemented generics, we can leverage this logic to more fully implement the datamodel of Python. This means that when calling methods, we check the loaded Python classes instead of implementing special logic in the type checker. We then match methods and their types.
High-level description of the feature
Call the proper magic methods of Python. We already make use of for instance:
__iter__()
__getitem__(self, item)
(#438 )__str__()
Up until now, this was done on a as-needed basis. However, a more exhaustive implementation is possible now thanks to the now more comprehensive generic implementation.
Description of potential implementation
See https://docs.python.org/3/reference/datamodel.html for method and function names.