Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '2.7': 0.04; 'arguments': 0.05; 'terry': 0.07; '3.x': 0.09; '__future__': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'pm,': 0.10; 'wrote:': 0.14; '2to3': 0.16; 'blindly': 0.16; 'earlier.': 0.16; 'reedy': 0.16; 'slashes': 0.16; 'uncle': 0.19; 'jan': 0.20; 'header:In-Reply-To:1': 0.21; 'downloaded': 0.21; 'division': 0.23; 'integer': 0.23; 'items.': 0.23; 'code': 0.24; 'import': 0.29; "didn't": 0.31; 'print': 0.31; 'header:X-Complaints-To:1': 0.32; 'to:addr:python-list': 0.33; 'header:User-Agent:1': 0.35; 'difference': 0.37; 'put': 0.37; 'received:org': 0.38; 'run': 0.38; 'subject:: ': 0.38; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'more': 0.60; 'double': 0.62; 'took': 0.63; '1/2': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Beginner needs advice Date: Sat, 28 May 2011 18:18:56 -0400 References: <4DDC7938.5000900@gmail.com> <11eb08a3-9cea-462f-ad1b-bf01d53f687a@z13g2000yqg.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 In-Reply-To: <11eb08a3-9cea-462f-ad1b-bf01d53f687a@z13g2000yqg.googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306621158 news.xs4all.nl 49044 [::ffff:82.94.164.166]:59911 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6494 On 5/28/2011 2:57 PM, Uncle Ben wrote: > Just this past Tuesday, I blindly downloaded 3.1 and found that at the > level I am workloing, all it took to get my 2.7 code to run was to put > parens around the print arguments and double the slashes in integer > division. I didn't even use the 2to3 automation. 1//2 works in 2.7 and earlier. from __future__ import division gives 1/2 == 0.5 and in 3.x print('abc') is the same as print 'abc' The parens only make a difference with 2 or more items. -- Terry Jan Reedy