You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to Node.
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_).
The text was updated successfully, but these errors were encountered:
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 bundlepartialplus.py
(orsearchspaces
). To save ourselves computation and headaches, we need a way of checking that objects are PartialPlus objects (or special functions defined bypartialplus
as node markers) without using isinstance/equality checks on functions.The plan:
_partialplus_version_
attribute toNode
.make_*
and*_node
functions, add a decorator @annotate_version that adds a 'partialplus_version' attribute, equal to partialplus's__version__
.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_
).The text was updated successfully, but these errors were encountered: