Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed1.swip.net!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'interpreter': 0.05; 'output': 0.05; 'subject:Python': 0.06; '*not*': 0.07; 'cc:addr :python-list': 0.11; '.py': 0.16; 'command.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'interpreter,': 0.16; 'is;': 0.16; 'magic': 0.16; 'repr()': 0.16; 'script,': 0.16; 'script?': 0.16; "someone's": 0.16; 'thursday,': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'print': 0.22; 'typical': 0.24; 'environment': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'unix': 0.29; 'mode': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; '>>>>': 0.31; 'sep': 0.31; 'actual': 0.34; 'could': 0.34; 'basic': 0.35; 'received:google.com': 0.35; 'consistent': 0.36; 'right?': 0.36; 'doing': 0.36; 'depends': 0.38; 'files': 0.38; 'pm,': 0.38; 'rather': 0.38; 'commands': 0.60; 'full': 0.61; 'entire': 0.61; "you're": 0.61; 'you.': 0.62; 'talking': 0.65; 'series': 0.66; 'commands.': 0.84; 'reliability': 0.84; '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=VeIBXGf3+477LNxOfiK92lObLxJjQT+QOLcAPro7aCg=; b=YtSQYn8woPST0izcett8oatwt/tWl3HGgxzJBF0feeKO+8WRcE3uLsR+xiZj8uINiX 80o3temUKAvPqzjH2hyMCT09rUVl1ifuc/+PmufA1blZ9nqe/9XHijDWcOLNz4tPuZEA /q46beY2tyD2+vhc2b4JaQKlz9MqqwImAi75iHwvNK1i6Yh/etPfeTTlBspIVQdWvfNt XWVxRLMC93SB5yzsrX5pjfWQpNd0OTSWCTeolIS6cXYp6f215CbS2C1JVzLMMdPySQ4d O/Ec/jvyHcm8yGEWolrztH0B6J4++FrWfvJUfvnwVvLQzukk5Kfiy10oCpOj/W2RQmXh k/sg== MIME-Version: 1.0 X-Received: by 10.43.96.65 with SMTP id cf1mr1471826icc.26.1409797548507; Wed, 03 Sep 2014 19:25:48 -0700 (PDT) In-Reply-To: <612dd9e6-653b-4e07-aebe-ffd31eec2a9e@googlegroups.com> References: <51acfec6-6b7b-4773-8d70-0360381bbed1@googlegroups.com> <612dd9e6-653b-4e07-aebe-ffd31eec2a9e@googlegroups.com> Date: Thu, 4 Sep 2014 12:25:48 +1000 Subject: Re: Python is going to be hard 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409797551 news.xs4all.nl 2830 [2001:888:2000:d::a6]:56150 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77524 On Thu, Sep 4, 2014 at 12:10 PM, Rustom Mody wrote: > On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote: >> On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote: >> >>>> NO PRINT > > >> Why are you so dead against print? > > Because it heralds a typical noob code-smell > [especially when the OP admits that BASIC is his background] And, of course, all those lovely Unix programs that produce output on stdout, they're full of code smell too, right? I don't care what someone's background is; console output is *not* code smell. Anyway, all you're doing is relying on the magic of interactive mode to call repr() and print() for you. >> Yes, or the OP could work with actual saved .py files and the >> reliability that comes from predictable execution environments... and >> use print. > > Dunno what you are talking about > > The interpreter-REPL is less reliable than a script? When you start a script, you have a consistent environment - an empty one. When you write a series of commands in the interactive interpreter, the environment for each one depends on all the preceding commands. So when you have a problem, you might have to copy and paste the entire interpreter session, rather than just the one command. ChrisA