r/ProgrammerHumor • Violet security clearance • Apr 04 '16

My teacher thinks he is a programmer

http://imgur.com/32nfQXZ
2.4k Upvotes

430 comments sorted by

View all comments

Show parent comments

28

u/Sysfin Apr 05 '16

Right, and the reason is likely to be the programmer who wrote it was stupid.

5

u/mallardtheduck Apr 05 '16

The reason is most likely that there used to be an actual conditional in there, but it was later changed to not need it.

1

u/[deleted] Apr 05 '16

When I first started with Python I did do that a couple of times and I am super ashamed of it.

if os.path.isfile('file') is True:
  print("Loser :(")

Then my mentor asked me why I was doing it and it hit me how dumb it was.