From 1f60a9487ca4114f040135fb14cabc155a041918 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 7 May 2012 17:52:02 +0200 Subject: [PATCH] Math: Allow 'factorial()' in icalc. --- plugins/Math/plugin.py | 5 +++-- plugins/Math/test.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/Math/plugin.py b/plugins/Math/plugin.py index a074b1417..ea03b0064 100644 --- a/plugins/Math/plugin.py +++ b/plugins/Math/plugin.py @@ -106,7 +106,8 @@ class Math(callbacks.Plugin): _mathEnv['abs'] = abs _mathEnv['max'] = max _mathEnv['min'] = min - _mathEnv.pop('factorial') + _mathSafeEnv = dict([(x,y) for x,y in _mathEnv.items() + if x not in ['factorial']]) _mathRe = re.compile(r'((?:(?