I was researching how to use pass statements in python. I have looked at (How to use the pass statement in Python) and while reading answers came up with some questions concerning other uses of the pass statement...
Should I use the pass statement in python for making my code more readable?
and
Would using the pass statement in this way potantially cause me any issues?
For example:
Below is a super simple program that basically says if someone is less than or is equal to 30 years old, don't do anything (pass). I know that if I wouldn't put pass, I would get an indentation error. Then after that I have my elif that'll print out "You are older than 30" if age is greater than 30.
age = 32
if age <= 30:
pass
elif age > 30:
print("You are older than 30")
Now I could've just written this code like this:
age = 32
if age > 30:
print("You are older than 30")
However, in terms of code readability, does adding a little more code and making things explicitly clear overall help me others who might go into the code in the future? Would coding in this way cause me any issues? Is there anything about using the pass statement in this way that could cause me some hiccups?