Using plural names for variable lists (General Programming Style)
Due to programming extensively with Lists in Python, I have been naming
many list variables, and iterative variables for iterating in the lists.
Is it readable in general specific to Python) to use plurals for lists and
singular forms for the iterative variable? Furthermore, do different
coding conventions have different answers?
For instance:
room_states = []
for room_state in room_states:
...
I find it easier to understand, but it may give some trouble to other
programmers who attempt to read my program, confusing one with the other.
No comments:
Post a Comment