79780011

Date: 2025-10-01 12:04:27
Score: 1
Natty:
Report link

So Apparently pass can't be used with If statements but ... can

for example, here, the python interpreter will not accept the if pass: statement

 while True:
     if pass :
         continue
     else:
         break

i get syntax error

     if pass :
        ^^^^
 SyntaxError: invalid syntax
 
 Process finished with exit code 1

but using ... it works.

 while True:
     if ... :
         continue
     else:
         break

which leads me to believe that ... has more use cases where pass would fail

I don't know why and I don't know if there are more scenarios like this but i bet there is, and if anyone can explain why this happens and if there's more scenarios like it that would be great.

Reasons:
  • RegEx Blacklisted phrase (1): i get syntax error
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: MTKing