Merge pull request #467 from pfn/calculator-bitwise-shift

Add shift operators to Simple Calculator KJ node
This commit is contained in:
Jukka Seppänen 2025-12-21 11:18:10 +02:00 committed by GitHub
commit 3160b36474
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2729,7 +2729,7 @@ class SimpleCalculatorKJ:
# Allowed operations
allowed_operators = {ast.Add: operator.add, ast.Sub: operator.sub, ast.Mult: operator.mul, ast.Div: operator.truediv,
ast.Pow: operator.pow, ast.USub: operator.neg, ast.UAdd: operator.pos,
ast.Pow: operator.pow, ast.USub: operator.neg, ast.UAdd: operator.pos, ast.LShift: operator.lshift, ast.RShift, operator.rshift,
}
# Allowed functions