Chnages to tutorial section
Hi Just starting to learn python and I was going through your (very well put together) tutorial - however it appears some editing may be in order as a number of earlier "programming examples" - e.g section 3.2. "First Steps Towards Programming" - once it introduces 'print' statement - the syntax is wrong for the newer version of python (as I found out from some Google searches) - in that print is now a function and the brackets are required. I know this may seem like nit-picking but sometimes when you are learning from scratch - little things like syntax errors - when you have typed exactly what is on the screen can be very frustrating. Regards Richard Jolly Business Change Manager Derbyshire Community Health Services Tel: 01332 404122 Mob: 07917424987 Laurie House, Colyear Street, Derby DE1 1LJ E-mail: richard.jolly@derbyshirecountypct.nhs.uk NHS Mail: richard.jolly@nhs.net Derbyshire Community Health Services is responsible for providing NHS Services in the Derbyshire area and is hosted by Derbyshire County Primary Care Trust. Advance Notice of Leave: Save Paper - do you really need to print this email? ******************************************************************************************************************** This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSI recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere For more information and to find out how you can switch, visit www.connectingforhealth.nhs.uk/nhsmail ********************************************************************************************************************
Am 08.07.2010 12:23, schrieb Jolly Richard (DERBYSHIRE COUNTY PCT):
Hi
Just starting to learn python and I was going through your (very well put together) tutorial - however it appears some editing may be in order as a number of earlier "programming examples" - e.g section 3.2. "First Steps Towards Programming" - once it introduces 'print' statement - the syntax is wrong for the newer version of python (as I found out from some Google searches) - in that print is now a function and the brackets are required.
I know this may seem like nit-picking but sometimes when you are learning from scratch - little things like syntax errors - when you have typed exactly what is on the screen can be very frustrating.
Hi Richard, thanks for your message -- it seems that you were looking at the tutorial in the docs for Python 2.6 or 2.7, where the print statement is indeed introduced as a statement. In the tutorial for Python 3.1, which can be found at http://docs.python.org/py3k/tutorial, the print function is correctly introduced as a function and shown called with parentheses. Regards, Georg
participants (2)
-
Georg Brandl -
Jolly Richard (DERBYSHIRE COUNTY PCT)