Use Python data model in context #444
Labels
code quality: general
Code quality issue not relevant to a particular module
enhancement: check
New feature in the type check module
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)
(Parsing and generation of dictionaries #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.
The text was updated successfully, but these errors were encountered: