erp5_catalog: Update the Filter and FilterDict class removing the useless methods
More comments about dict-like objects in Python: - do not use .keys() whenever you don't need a list copy of keys - do not implement a has_key method that would only be an alias of __contains__ (btw, there's still a lot of uses on dict.has_key in ERP5 and they should be replaced by in) - do not implement a get method that calls __getitem__ unless it is used often; if performance is important, you may consider to duplicate the code of __getitem__ - similarly, we could remove the keymethod: the caller could still cast to list /suggested by @jm
Showing
Please register or sign in to comment