Open
Description
Writing this down so I don't forget.
One of the goals is to be able to distribute partialplus.py
with your project and have it interoperate with other projects that bundle partialplus.py
(or searchspaces
). To save ourselves computation and headaches, we need a way of checking that objects are PartialPlus objects (or special functions defined by partialplus
as node markers) without using isinstance/equality checks on functions.
The plan:
- Add a class-level
_partialplus_version_
attribute toNode
. - For
make_*
and*_node
functions, add a decorator @annotate_version that adds a 'partialplus_version' attribute, equal to partialplus's__version__
. - All the
is_*
functions should then check the function's name attribute and the_partialplus_version_
attribute (there should be a separate function that checks that__version__
is greater than or equal to the node's_partialplus_version_
).
Metadata
Metadata
Assignees
Labels
No labels