On Sat, Oct 2, 2010 at 8:19 PM, William Grant <email address hidden> wrote:
>
> - if requested_name_filter is not None:
> + if (requested_name_filter is not None and
> + len(requested_name_filter[0]) > 0):
> return requested_name_filter[0]
I would write this as
'if requested_name_filter and requested_name_filter[0]:'
Its more correct (if requested_name_filter[0] = None, your code will crash).
On Sat, Oct 2, 2010 at 8:19 PM, William Grant <email address hidden> wrote: name_filter is not None: name_filter is not None and name_filter[ 0]) > 0): name_filter[ 0]
>
> - if requested_
> + if (requested_
> + len(requested_
> return requested_
I would write this as name_filter and requested_ name_filter[ 0]:'
'if requested_
Its more correct (if requested_ name_filter[ 0] = None, your code will crash).
Looks good otherwise.
-Rob