if len(tags) == 0

Couldn't you just say something like:
if tags is None:
    # 'Error' handling
elif not tags: 
    # Empty list case
else:
    # Process returned list
I like it better than saying "if len(tags) == 0", and if you've already tested for None then it has the same effect. What do you think?

Reply

The content of this field is kept private and will not be shown publicly.