[docs] SyntaxError: invalid syntax

Ian Sweeney ian.sweeney at lljproperty.com
Thu Nov 4 19:06:04 CET 2010


Hi,

I've just installed Python v3.1.2 onto Windows Vista.

I started IDLE and typed help() which suggested I look at
http://docs.python.org/tutorial/

Section 2.1.2. Interactive Mode suggested the following code:

the_world_is_flat = 1if the_world_is_flat:
  print "Be careful not to fall off!"


The line
print "Be careful not to fall off!"
generates SyntaxError: invalid syntax

The Python v3.1.2 documentation on Windows which was installed as a Windows
help file gives a slightly different Section 2.1.2. Interactive Mode
suggestion:

the_world_is_flat = 1if the_world_is_flat:
  print ("Be careful not to fall off!")


This code works. The online documentation needs to change to show working
code (or if appropriate indicate that the code is version specific).

-- 

 Regards,



*Ian Sweeney*

Head of IT
*
------------------------------
*

LLJ Property LLC
PO Box 107729 Abu Dhabi UAE

Tel:  +44 7941 045102

Email: ian.sweeney at lljproperty.com*
*www.lljproperty.com



DISCLAIMER: The information contained in this mail is for the intended
addressee
only, if you have received this mail by mistake, please forward it to
admin at lljproperty.com. Any opinions expressed, implied or presented are
solely those of the author and do not necessarily represent those of LLJ
Property LLC.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20101104/226f5a12/attachment-0001.html>


More information about the docs mailing list