Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'syntax': 0.04; 'output': 0.05; 'oh,': 0.09; 'scripts': 0.10; 'anyone?': 0.16; 'formatting': 0.16; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'received:188.174': 0.16; 'received:80.91': 0.16; 'received:80.91.229': 0.16; 'received:gmane.org': 0.16; 'received:list': 0.16; 'received:mnet- online.de': 0.16; 'semantics': 0.16; 'subject: \n ': 0.16; 'subject:Why': 0.16; 'subject:language': 0.16; 'subject:still': 0.16; 'mon,': 0.16; 'passing': 0.18; 'stefan': 0.18; 'all,': 0.21; 'header:In-Reply-To:1': 0.23; 'code.': 0.24; 'pass': 0.25; 'print': 0.25; 'header:User-Agent:1': 0.26; '[1]': 0.27; 'statement': 0.27; 'subject: ?': 0.27; 'header:X-Complaints-To:1': 0.28; "doesn't": 0.28; "d'aprano": 0.29; 'steven': 0.29; 'function': 0.29; 'logging': 0.30; 'helpful': 0.31; 'that.': 0.31; 'code': 0.31; 'mode': 0.35; 'to:addr:python-list': 0.35; 'something': 0.36; 'does': 0.36; 'but': 0.36; 'subject:: ': 0.37; 'application': 0.38; 'some': 0.38; 'explain': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'too': 0.39; 'why': 0.39; 'enough': 0.39; 'received:org': 0.39; 'rather': 0.39; 'header:Received:5': 0.39; 'received:de': 0.40; 'simply': 0.60; 'yes,': 0.60; 'simple': 0.60; 'first': 0.62; 'skip:n 10': 0.63; 'making': 0.67; 'obvious': 0.72; 'special': 0.74; 'fortunately': 0.84; 'forward,': 0.84; 'thing,': 0.84; 'mistake': 0.91; 'seriously,': 0.91; 'subject:there': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Stefan Behnel Subject: Re: Why has python3 been created as a seperate language where there is still python2.7 ? Date: Tue, 26 Jun 2012 08:34:03 +0200 References: <1340509604.38915.YahooMailClassic@web164605.mail.gq1.yahoo.com> <4fe92df1$0$29978$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: ppp-188-174-104-220.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1340692466 news.xs4all.nl 6914 [2001:888:2000:d::a6]:42010 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:24460 Devin Jeanpierre, 26.06.2012 08:15: > On Mon, Jun 25, 2012 at 11:35 PM, Steven D'Aprano >> Making print a statement in the first place was a mistake, but >> fortunately it was a simple enough mistake to rectify once the need for >> backward compatibility was relaxed. > > Hmmm, why is the function so much better than the statement? You like > using it in expressions? Or is it that you like passing it in as a > callback? First of all, the statement has a rather special syntax that is not obvious and practically non-extensible. It also has hidden semantics that are hard to explain and mixes formatting with output - soft-space, anyone? The function is straight forward, configurable, does one thing, works with help() and doesn't get in the way. And something as rarely[1] used as a print simply doesn't deserve special syntax. Oh, and, yes, you can even pass it into some code as callback, although I rarely had a need for that. Stefan [1] Seriously, it's not very helpful in interactive mode and too simplistic to be used in application code. Even scripts often work better with logging than with prints.