Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python.': 0.02; '21,': 0.07; 'method.': 0.07; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'happily': 0.16; "object's": 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'code,': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'versions': 0.24; 'cc:2**0': 0.24; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'file': 0.32; 'probably': 0.32; 'fri,': 0.33; 'basic': 0.35; 'common': 0.35; 'form.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'pm,': 0.38; 'most': 0.60; "you're": 0.61; 'mar': 0.68; 'lowest': 0.74; 'unusual': 0.74; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=sodauj7+CQ7ecyjlGrVQ4wpPeIcuyrgMwWJgaR0sZb8=; b=EiUElEIlAn/dOES559DIezuwJZFU+BkSpy9Ytr6YVJe7gxRT1PJ1rV8UJIF5os9Poz ehGMXcq8ryFS/WITcfmoJyyVIk8Xb0XlAq1IHVumZRKO+WR3/vKFqYc4CajTxzsNFMT6 NS3y+spnfzGAKn7uqszRQpQt/DTHR9WW9IvHzl1KFmss3Lj6qQ0A1xLEMi8z9xp2BF0C 5YnPPOrGqnPRQaNe2JyjaBEkiofoJiCQ4q12vTunPOIIWfvMtPpPNRbnMFACPw9fSXyI nS/xXEModUIXsIQmqOfFoBKBfp65Q+FY58BzPsmsS1b3bt9/goQE+BB3QugXwnPqqZvy PD0w== MIME-Version: 1.0 X-Received: by 10.66.197.164 with SMTP id iv4mr51781407pac.18.1395381267011; Thu, 20 Mar 2014 22:54:27 -0700 (PDT) In-Reply-To: <87txasksn1.fsf@elektro.pacujo.net> References: <87ob10nbeh.fsf@elektro.pacujo.net> <532B4750.2090006@yahoo.com> <87eh1wpr96.fsf@elektro.pacujo.net> <8738icppoe.fsf@elektro.pacujo.net> <87pplgoac6.fsf@elektro.pacujo.net> <8738icmrw4.fsf@elektro.pacujo.net> <87txasksn1.fsf@elektro.pacujo.net> Date: Fri, 21 Mar 2014 16:54:26 +1100 Subject: Re: running python 2 vs 3 From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395381598 news.xs4all.nl 2885 [2001:888:2000:d::a6]:45299 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68676 On Fri, Mar 21, 2014 at 4:49 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> go for the lowest common denominator: >> >> print("some single string") >> >> which works happily in all versions of Python. > > Whenever I have used "print" in my code, it has been with a >> > redirection. Then you're probably not using "sys.stdout.write" but some other file object's write method. Also, I find it highly unusual that you never use print in its most basic and intended form. ChrisA