Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'syntax': 0.03; 'ignored': 0.05; 'executed': 0.07; 'host,': 0.07; 'python': 0.09; 'cmd': 0.09; 'tends': 0.09; 'client,': 0.16; 'describing': 0.16; 'expression"': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'rule.': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'accepting': 0.18; 'shell': 0.18; 'feb': 0.19; 'followed': 0.20; 'errors': 0.23; 'statement': 0.23; 'feature': 0.24; 'command': 0.24; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'execution': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'all.': 0.28; '"do': 0.29; 'bad.': 0.29; "d'aprano": 0.29; 'implicitly': 0.29; 'steven': 0.29; 'usually': 0.30; 'code': 0.31; 'system,': 0.32; 'file': 0.32; 'says': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'text': 0.34; 'received:209.85': 0.35; 'something': 0.35; 'ability': 0.36; 'but': 0.36; "wasn't": 0.36; "didn't": 0.36; 'anything': 0.36; 'should': 0.36; 'too': 0.36; 'turn': 0.36; 'being': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'skip:" 10': 0.40; 'end': 0.40; 'your': 0.60; 'address': 0.60; 'subject:...': 0.63; 'sound': 0.65; 'sounds': 0.71; '2013': 0.84; 'processor.': 0.84; 'dennis': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=F2tZb020FsQ+MquStrN1kn2ppqzMSpdakNmJbdfa7V8=; b=m/tLpaqm1xQ1TJMH3Y8DjVku8DiZXliQRCtnHZ4d9L5Z0rq3hs+DRJsXAoGS7OiDCF sopBTk1bQUc2S8saNNG/sSL92c1YNUmiZyRVTUFmQF5xa6+bhsTWadQG5gD44um6Cj5B w6MRckQaKBuJsU5vxwcuSXs5gHGqWImg1oUij/xbrGrmGcm7GS6uWOi2jRqobo+z5SZR vFCM3xxYH77RDx/qgd5jMmuYQMRxGwVIShltlDbpSH3nQvlXYIEi8UaubZrkFkVn2140 FsZT4QAbiMBRmk/rgkASND5Q6yczALInKqHxgAr7Kf55ccmeGthJ4XWXYOcig7ti0IYa T5Kg== MIME-Version: 1.0 X-Received: by 10.52.176.202 with SMTP id ck10mr58547vdc.42.1360214898011; Wed, 06 Feb 2013 21:28:18 -0800 (PST) In-Reply-To: <5112eb4a$0$29965$c3e8da3$5496439d@news.astraweb.com> References: <207d17ce-4bc7-487c-acde-6a7b9f66002b@googlegroups.com> <5111b826$0$29969$c3e8da3$5496439d@news.astraweb.com> <5112eb4a$0$29965$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 7 Feb 2013 16:28:17 +1100 Subject: Re: Opinion on best practice... From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360214905 news.xs4all.nl 6912 [2001:888:2000:d::a6]:48248 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38330 On Thu, Feb 7, 2013 at 10:46 AM, Steven D'Aprano wrote: > Dennis Lee Bieber wrote: >> Though that is the nice feature of REXX*... Anything that wasn't >> parsable as a REXX statement was automatically sent to the current >> command processor. > > Nice? Are you being sarcastic? What you're describing sounds like a > classic "Do What I Mean" system, which invariably end up being followed by > anguished shouts of "Noooo, I didn't mean that!!!". > > If you say "Anything that isn't parsable is automatically sent to the > shell", it doesn't sound too bad. But when you say "Unparseable junk is > implicitly treated as code and sent off to be executed by something which > traditionally tends to be forgiving of syntax errors and has the ability to > turn your file system into so much garbage", it sounds a tad less > appealing. You misunderstand. It's actually a very simple rule. Python follows C's principle of accepting that any return value from an expression should be ignored if you don't do anything with it. REXX says that any "bare expression" used as a statement is implicitly addressed to the default host, which is usually a shell (though I built myself a MUD system where the default would send text to the client, and shell execution required ADDRESS CMD "some_command" explicitly); it's very simple and doesn't feel like a DWIM system at all. ChrisA