Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.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.027 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'output': 0.05; 'say,': 0.05; 'python3': 0.07; 'script,': 0.16; 'statement.': 0.16; 'subject:python': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'code.': 0.18; 'thu,': 0.19; 'to:name:python- list@python.org': 0.22; 'define': 0.26; 'somewhere': 0.26; 'header :In-Reply-To:1': 0.27; 'function': 0.29; 'message- id:@mail.gmail.com': 0.30; '(which': 0.31; 'prints': 0.31; 'file': 0.32; "can't": 0.35; 'received:google.com': 0.35; 'really': 0.36; 'should': 0.36; 'changing': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'though,': 0.39; 'to:addr:python.org': 0.39; 'simple': 0.61; 'stand': 0.64; 'different': 0.65; 'mar': 0.68; '20,': 0.68; ':).': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=FUL8Mafr5U4KQOjjdMuRU81LWIipudyYVyCJSMK3WTs=; b=uofM/UT5TetGXf8oayuHXozLvW7KO5MSU16VEXVhDI8hYw8A/pEO0WAN3M4rs90oAy S0ZHTznNzMT4xSfX8kJjGZxvXUg23okVC2jHnzlN3LtDWYyhnyVp8u1ulmU1yM+oUWSK qFuk42KLv8GCINEOcSwb8CtEmOa7b8YFlYrNa2xXc4JcTlkKmmjcYVJrC/fIzG6q/tL/ bXX7ixa61kkfdDwlSWBD4SmXuitXA19CiV+X+mF7gf9fj8yBi5ITh732o43mJJrTReEO xtwXy9nTi+5HeymQlAbIzy8sZTYA/hQ+nXbtEQ6I5d8CBw10YpAwVDmdRnX/u/iRGk+j SgQw== X-Received: by 10.42.224.194 with SMTP id ip2mr2237753icb.91.1395348251074; Thu, 20 Mar 2014 13:44:11 -0700 (PDT) MIME-Version: 1.0 Sender: zachary.ware@gmail.com In-Reply-To: <87a9ckpq7y.fsf@elektro.pacujo.net> References: <87ob10nbeh.fsf@elektro.pacujo.net> <532B4750.2090006@yahoo.com> <87eh1wpr96.fsf@elektro.pacujo.net> <87a9ckpq7y.fsf@elektro.pacujo.net> From: Zachary Ware Date: Thu, 20 Mar 2014 15:43:50 -0500 X-Google-Sender-Auth: ajER8tpAXJ-H-_4iYcN-J8qD3SM Subject: Re: running python 2 vs 3 To: "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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395348254 news.xs4all.nl 2928 [2001:888:2000:d::a6]:54963 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68616 On Thu, Mar 20, 2014 at 3:30 PM, Marko Rauhamaa wrote: > I must say, though, that Python3 destroyed "print" forever for me. To > avoid nausea, I write sys.stdout.write() in all Python3 code. To each their own :). I can't stand using 'print' as a statement. It's a very nice trick to be able to write a script, think "oh, all those prints should really be sending that output somewhere else", and then instead of changing every individual print, just define a different 'print' function at the top of the file (which may be as simple as `print = functools.partial(print, file=sys.stderr)` or `print = logging.debug`). -- Zach