> Yes, this is a bug. Does anyone have an idea how to fix it? Maybe the > handlers_dict.update should be our own method and it should raise an > exception if one key is updated twice? E.g. one would first have to > remove the key, then register it. Then the user will know that two > packages use the same key at least.
Does it make logical sense to have more than 1 query for an assumption type: register_query_handler('associative',FooAssociativeQueryHandler) register_query_handler('associative',BarAssociativeQueryHandler) The internal data structure would be a dict of lists, keyed by things like 'associative'. I guess what I don't know is if the assumption system is setup to go through a sequence of handlers or if that makes sense. Thinking out loud here... If different QueryHandlers implement methods for different types: class FooAssociativeQueryHandler(QueryHandler): def Symbol(self): return True class BarAssociativeQueryHandler(QueryHandler): def Number(self): return True I can imagine that you can go through and try each handler. The issue is when more than one handler tries to handle a single type. The only thing I can think of then is to have a priority system, where the handlers are tried in order of increasing priority and the final value (the highest priority one) wins. Cheers, Brian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to sympy-patches@googlegroups.com To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en -~----------~----~----~----~------~----~------~--~---