-
Notifications
You must be signed in to change notification settings - Fork 3
Implement dict views objects #84
Copy link
Copy link
Open
Labels
featureA new feature (not an enhancement!)A new feature (not an enhancement!)need discussion/reflexionYet to decide architectural-level changesYet to decide architectural-level changesperformanceperformance-improvement enhancementperformance-improvement enhancement
Description
Activity
Metadata
Metadata
Assignees
Labels
featureA new feature (not an enhancement!)A new feature (not an enhancement!)need discussion/reflexionYet to decide architectural-level changesYet to decide architectural-level changesperformanceperformance-improvement enhancementperformance-improvement enhancement
Currently we have the ABCs views (keys, values, items), and we use them to opaquely wrap
PyDict.It works! but, this is:
PyObjectfunctions instead of highly optimizedPyDictones)However the C API surrounding views is a bit clunky and currently VERY limited in pyo3, so we should first of all choose if we:
A) Implement "from scratch" the views in pyclass, directly wrapping a
PyDict.B) Wrap the corresponding views objects.
B is vastly preferable due to better consistency with the rest of the codebase and much easier maintenance, but due to the aforementionned clunky C API this is not a straightforward a decision than other collections.
Moreover, the "1 parent class" only force us to first of all refactorize the rust codebase as a whole to consistently use
py_abcproc macro to enforce traits and reduce code duplication, to avoid painfully reimplementing ALL the methods by hand again.