Okay so I've am about to put my toes in the pool that is programing, I bought a Python instructional guide and downloaded 3.0 but upon typing the "Hello World!" program it says I have a invalid syntax. I'm thinking it has something to do with my OS (Vista), Should I try to switch OS's? I'm not necessarily computer illiterate but I have a fuck load to learn obviously, thanks for any help
Your book is probably a bit dated because python 3.0 JUST came out and made some major changes with python including the print statement.
Go back to the web site and download 2.6 instead, that way you can follow the book.
Name:
Anonymous2009-01-22 21:02
>>3
awesome thanks, can any of you direct me to a basics guide to computers in general? Something that's quite comprehensive , from moving and clicking icons to complex stuff
Name:
Anonymous2009-01-22 21:07
One change in Python 3 is that print now requires parentheses:
Old style, Python 1 and 2:
print "Hello, world!"
New style, Python 3:
print("Hello, world!")
It's disappointing that you got tripped up by Python 3 on your first Hello World, but I promise the rest of your experience will be smoother.
Name:
Anonymous2009-01-22 22:12
Shit like this is why Py3k is fucking dumb.
Name:
Anonymous2009-01-22 22:13
Next thing you know they're going to be forcing indentation...
Name:
Anonymous2009-01-22 22:47
>>4
I don't think anything like that exists. You'll have to pick up more specific subjects from individual sources.
Name:
Anonymous2009-01-22 23:52
>>5,6
Actually, it's much better in the long run because print should have always been a function, not a special statement.
requiring parentheses in print statement is standard practice:
the encapsulation statement(code) is visually unambiguous and parsed more efficiently by interpreter or compiler,as it know the exact boundary.
>>12
but it's more fun to be ambiguous; that's why everyone loves perl programmers
Name:
Anonymous2009-01-23 15:12
Because print is a function you can now do print = name_of_your_function, and by doing this 'reroute' output without searching your code for 'print' occurencies and replacing them.
Name:
Anonymous2009-01-23 15:25
>>14
You could do the same thing by replacing sys.stdout with a filter. Breaking the language was not necessary.