-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Currently one can register a callback for converting to Python an OpenMath symbol, based on cd and name.
A more general mechanism would be to support registering callbacks based on:
- cdbase, cd, and name
- cdbase and cd
- cdbase
- nothing (defining a default callback)
Taking the cdbase into account is required anyway by the OpenMath standard.
The others are practical in situations where all symbols in a given context (cd, cdbase) are handled identically, typically by loading the eponymous global Python object / functions.
Practical use case: in the pickle-based serialization, Florian recommends using a plain OMS symbol to represent a global Python objects; something like:
<OMS cdbase=python cd=sagemath name=sage.foo.bar.baz/>
In that case, having to register all symbols would be unpractical.
Metadata
Metadata
Assignees
Labels
No labels