Commit 2b117f88 authored by Evan Simpson's avatar Evan Simpson

Allow filter(None, ...)

parent 66895ce4
......@@ -83,7 +83,7 @@
#
##############################################################################
__version__='$Revision: 1.6 $'[11:-2]
__version__='$Revision: 1.7 $'[11:-2]
from zbytecodehacks.VSExec import SafeBlock, GuardedBinaryOps, \
UntupleFunction, RedirectWrites, WriteGuard, RedirectReads, ReadGuard, \
......@@ -171,6 +171,8 @@ safebin['hasattr'] = __careful_hasattr__
def __careful_filter__(f, seq, skip_unauthorized=0):
if type(seq) is type(''):
return filter(f, seq)
if f is None:
def f(x): return x
v = getSecurityManager().validate
result = []
a = result.append
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment