> I wondering if is this a good pattern to apply, i like the way it looks
> like, at least to me it looks `natural', but...im calling every method
> twice here? One in v_dict and again on the dict iteration?
>
> Any suggestion will be great!

Another suggestion is to use a naming convention for your validators.
Then you don't need a separate dict that lists them. Just run through
your module or class dict and process each method/function whose name
starts with a certain pattern. You can also cache the names the first
time round so you don't have to match string patterns every time that
collect_validators() runs.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to