changeset 2092:937da10cb5b3

s/filter/filter_func/ to avoid conflict with builtin name
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Mon, 04 Jun 2007 23:31:07 +0200
parents 7af58454aafa
children 917bb59fdbb8
files MoinMoin/user.py
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/user.py	Sun Jun 03 21:56:02 2007 +0200
+++ b/MoinMoin/user.py	Mon Jun 04 23:31:07 2007 +0200
@@ -41,22 +41,22 @@
     userlist = [f for f in files if user_re.match(f)]
     return userlist
 
-def get_by_filter(request, filter):
-    """ Searches for an user with a given filter """
+def get_by_filter(request, filter_func):
+    """ Searches for an user with a given filter function """
     for uid in getUserList(request):
         theuser = User(request, uid)
-        if filter(theuser):
+        if filter_func(theuser):
             return theuser
 
 def get_by_email_address(request, email_address):
     """ Searches for an user with a particular e-mail address and returns it. """
-    filter = lambda user: user.valid and user.email.lower() == email_address.lower()
-    return get_by_filter(request, filter)
+    filter_func = lambda user: user.valid and user.email.lower() == email_address.lower()
+    return get_by_filter(request, filter_func)
         
 def get_by_jabber_id(request, jabber_id):
     """ Searches for an user with a perticular jabber id and returns it. """
-    filter = lambda user: user.valid and user.jid.lower() == jabber_id.lower()
-    return get_by_filter(request, filter)
+    filter_func = lambda user: user.valid and user.jid.lower() == jabber_id.lower()
+    return get_by_filter(request, filter_func)
 
 def _getUserIdByKey(request, key, search):
     """ Get the user ID for a specified key/value pair.