I don't want to make this change until I'm sure I know it won't break
anything :)

I believe that, in this code, the check if
self._actionSet().hasKey(action) is superfluous:

                # Check for actions
                for action in self.actions():
                        if req.hasField('_action_%s' % action) or \
                           req.field('_action_', None) == action or \
                           (req.hasField('_action_%s.x' % action) and \
                            req.hasField('_action_%s.y' % action)):
                                if self._actionSet().has_key(action):
                                        self.handleAction(action)
                                        return

Since the call comes inside of a loop where action is defined as a member
of self.actions(), and _actionSet is created from self.actions(), there's
no need to check it again, right?

I realize _actionSet is useful for streamlining dispatch of old-style
actions (when are those going away, BTW? :) ), so I'm not saying to remove
it entirely. I'm just wondering if we can take this one check out?




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to