len(tags)

I prefer len(tags) because, to me, not tags is relying on the "falseness" of an empty list, which I find annoying. I think if I reread the above code a year later I would be confused as to why I had used tags is None followed by not tags and factor it out. I guess I find len(tags) more self-documenting. But, that's just my preference, it works either way of course.

Reply

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