You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at one's own old, bad code can be a source of great cringe.
I remember prepending if incidents is not None because if incidents is None, then a TypeError is raised on the second condition. This line can be reduced to if incidents: without any change in behavior.
Checking the list length before iterating over it is a no-op.
Explanation
Looking at one's own old, bad code can be a source of great cringe.
I remember prepending
if incidents is not None
because if incidents is None, then aTypeError
is raised on the second condition. This line can be reduced toif incidents:
without any change in behavior.Checking the list length before iterating over it is a no-op.
Example
The text was updated successfully, but these errors were encountered: