I object to if super_users: over if len(super_users) > 0: There is a huge difference between an empty list and None. If you want to check that the length of the list is greater than zero you should... just do that.
A lot of this reads like "Abuse syntax to make your code look more Pythonic" and treats Pythonic like some lofty goal. A lot of "Pythonic" code is just harder to read, it isn't an end in itself.
I object to if super_users: over if len(super_users) > 0: There is a huge difference between an empty list and None.
Both of these tests can only be used if you know that super_users is a list and not None.
Using if super_users: is not abusing syntax, it just uses the intended and well-known fact that non-empty sequences are true. (It's also recommended by the style guide PEP8.)
0
u/[deleted] Jun 23 '14
[deleted]