From: Stefan Behnel Date: Thu, 21 Feb 2013 22:52:15 +0000 (+0100) Subject: support special comparison methods in method dispatch transforms X-Git-Tag: 0.19b1~126^2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b7cd5711eed5d413726501a58270f7f617caf74;p=platform%2Fupstream%2Fpython-cython.git support special comparison methods in method dispatch transforms --- diff --git a/Cython/Compiler/Visitor.py b/Cython/Compiler/Visitor.py index 469d3cc..777e0c0 100644 --- a/Cython/Compiler/Visitor.py +++ b/Cython/Compiler/Visitor.py @@ -492,7 +492,16 @@ class MethodDispatcherTransform(EnvTransform): args = node.args return self._dispatch_to_handler(node, function, args, None) + def visit_PrimaryCmpNode(self, node): + return self._visit_binop_node(node) + + def visit_CascadedCmpNode(self, node): + return self._visit_binop_node(node) + def visit_BinopNode(self, node): + return self._visit_binop_node(node) + + def _visit_binop_node(self, node): self.visitchildren(node) # FIXME: could special case 'not_in' special_method_name = find_special_method_for_binary_operator(node.operator)