it's official: I hate Python.
Code:
x = 1
y = 5
z = 7
print x,y,z
if x < y:
if x < z: print 'x is least'
elif y < z: print 'y is least'
else: print 'z is least'
does not equal:
Code:
x = 1
y = 5
z = 7
print x,y,z
if x < y:
if x < z: print 'x is least'
elif y < z: print 'y is least'
else: print 'z is least'
and that makes me sad.
I understand why they aren't the same, but so much of my time is spent on learning how to indent, breaking code because of indentation, worrying about whether or not I indented correctly, and so much garbage about indent indent indent. Thanks to Python, I now hate the word 'indent.'
Okay, aside from the indents, there are some pretty cool features to Python, but yuck, I can't wait to see some brackets again.
----------------------
On a more serious note:
There was one part of the lecture where the professor is talking about floating point numbers and he did this example directly into the Python Shell:
Code:
>>> x = 0.1
>>> print x
0.1
>>> x
0.1
>>>
his answer came out: 0.1000000000000001.
The implications of this is beyond my head (there is something magical about the number 17 here), but I find this sort of valuable to know about if you are really into this side of things. Regardless, this only means something changed, and I don't know why. Is this new thing universal to all programming languages or only Python?