On Dec 14, 9:08 pm, Ronan Lamy <[email protected]> wrote: > There are already plenty of functions that are effectively generic. They > use one of 3 mechanisms: > * 1) Call some predefined method on their argument (either > _eval_the_function or __the_function__) > * 2) Find a function whose name matches the argument class name inside > some namespace (usually a class): that's what printers and "ask > handlers" do. > * 3) Use ugly ad-hoc elif chains. > > 3) is unpythonic. 1) doesn't allow new functions without modifying the > core. 2) forces every new class to modify the functions' namespace.
It sounds that you are not in favor of any of these possibilities. How should we do it otherwise? Vinzent -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
