Nov-28-2017, 02:50 AM
i used to use this style
comments?
if value is True: count += 1but i have changed to this style
if value in True: count += 1but now i am reconsidering. i think that in some cases the one line style can be easier to understand, especially if multiple related clauses are lined up vertically, such as
if ch in ('t','T'): return True if ch in ('f','F'): return False else: return Noneso i would not be going back all the way but just part way, just doing it in cases that seem to me to add to readability. even though this example is simple to understand, IMHO, it is quicker to read this way.
comments?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.