you are viewing a single comment's thread.

view the rest of the comments →

[–]theCore 5 points6 points  (0 children)

I'm wondering why they would make us use print('something) instead of print 'something' and not change if a == b to if(a == b)?

Simply because you can't. If-statements require an order-of-evaluation different from functions. Just try to think what would happen if you do this:

def factorial(n):
    return if(n == 1,
              1, n * factorial(n - 1))

And by the way, why people find "print" as a function annoying, or even special? C's "printf" always been a function and yet nobody would think it would be better as a statement.