Explorar o código

Added possibility message for add_numerics.

Sander Mathijs van Veen %!s(int64=14) %!d(string=hai) anos
pai
achega
96e20bcc14
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/rules/numerics.py

+ 5 - 0
src/rules/numerics.py

@@ -3,6 +3,7 @@ from itertools import combinations
 from .utils import nary_node
 from ..node import ExpressionLeaf as Leaf, OP_DIV, OP_MUL
 from ..possibilities import Possibility as P, MESSAGES
+from ..translate import _
 
 
 def add_numerics(root, args):
@@ -25,6 +26,10 @@ def add_numerics(root, args):
     return nary_node('+', scope)
 
 
+MESSAGES[add_numerics] = _('Add the constants {1} and {2}, which'
+        ' will reduce to {1} + {2}.')
+
+
 #def match_subtract_numerics(node):
 #    """
 #    3 - 2      ->  2.0