[Tutor] Can't even get hello to work???!!

Alan Gauld alan.gauld at btinternet.com
Thu Dec 16 15:30:27 CET 2010


"Emile van Sebille" <emile at fenx.com> wrote

>>> print 'hello'
>>> ...
>>> SyntaxError: invalid syntax

> Actually, "the print statement is deprecated" ought not be out of 
> reach.

Its very unfortunate that Python 3 didn't include a special error or 
warning
message for the print statement. This kind of error for a complete
beginner is very off putting and print "hello world" is probably the 
first
thing many newbies try and many v2 tutorials start with. And even for
non-newbies print syntax errors are by far the most common issue
when migrating to Python 3 from 2 - I've been bitten several times
myself before realizing its the missing parens on print...

It is the kind of basic problem that will turn many would be
programmers away from Python. You can argue about the purity of
such a special method being inconsistent etc, but in practical terms
if we wanted people to use Python we have just introduced a big,
and largely unnecessary, barrier.

A missed opportunity I fear.

Alan G. 




More information about the Tutor mailing list