From b24d3607750b87449b77c6a73edc178a9de77b6c Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 11 Apr 2003 20:04:43 +0000 Subject: [PATCH] Just changed some inserts into _mathEnv to be in the initial declaration. --- plugins/FunCommands.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/FunCommands.py b/plugins/FunCommands.py index 9efd753b7..e8b060f5a 100644 --- a/plugins/FunCommands.py +++ b/plugins/FunCommands.py @@ -324,11 +324,9 @@ class FunCommands(callbacks.Privmsg): # Then we delete all square brackets, underscores, and whitespace, so no # one can do list comprehensions or call __...__ functions. ### - _mathEnv = {} + _mathEnv = {'__builtins__': new.module('__builtins__'), 'i': 1j} _mathEnv.update(math.__dict__) _mathEnv.update(cmath.__dict__) - _mathEnv['i'] = 1j - _mathEnv['__builtins__'] = new.module('__builtins__') _mathInt = re.compile(r'(?