4 ms·
You could modify it easily, for example the user could register an additional function to the mapping. That would not be as easy to do with a module and getattr
by Znafon 3y ago
You could modify it easily, for example the user could register an additional function to the mapping. That would not be as easy to do with a module and getattr().
You can also list the registered function with math_exprs.keys() and that might not be as easy with a module either.
- anentropic 3y agoif all the keys are unknown until runtime then I guess the dict makes sense I don't think it makes much sense in the example code given