Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Why not allow empty code blocks? Date: Sun, 31 Jul 2016 02:37:42 +1000 Lines: 32 Message-ID: References: <5792cd34$0$1587$c3e8da3$5496439d@news.astraweb.com> <87vazwppxx.fsf@elektro.pacujo.net> <579B1ABB.1070500@rece.vub.ac.be> <579c2095$0$22142$c3e8da3$5496439d@news.astraweb.com> <579cbded$0$1605$c3e8da3$5496439d@news.astraweb.com> <758a1961-00bc-4b1c-834b-a7deca94d029@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de 0a67iXhQqWd1PakUVOY7qw0S+TqVlGRm5Y1RdOH8iZaQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'diff': 0.05; 'ignored': 0.05; 'subject:code': 0.07; 'cc:addr:python-list': 0.09; 'absent': 0.09; 'beginners': 0.09; 'naturally': 0.09; 'subject:Why': 0.09; '\xe2\x80\x94': 0.09; 'python': 0.10; 'subject:not': 0.11; 'value.': 0.15; '"x"': 0.16; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'stark': 0.16; 'subject:allow': 0.16; 'value;': 0.16; 'wrote:': 0.16; 'char': 0.18; 'student': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; '31,': 0.22; 'am,': 0.23; 'code,': 0.23; 'leave': 0.23; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'message-id:@mail.gmail.com': 0.27; 'function': 0.28; 'this.': 0.28; 'procedures.': 0.29; 'print': 0.30; 'that.': 0.30; "can't": 0.32; 'useful': 0.33; 'problem': 0.33; '(for': 0.34; 'received:google.com': 0.35; 'something': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'closing': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'being': 0.37; 'method': 0.37; 'difference': 0.38; 'why': 0.39; 'does': 0.39; 'called': 0.40; 'easy': 0.60; 'your': 0.60; 'side': 0.62; 'more': 0.63; 'times': 0.63; 'between': 0.65; 'bothered': 0.66; 'production': 0.67; 'teaching': 0.69; 'jul': 0.72; 'chrisa': 0.84; 'distinguish': 0.84; 'i\xe2\x80\x99ll': 0.84; 'ultimately,': 0.84; 'to:none': 0.91; 'notion': 0.91; 'magical': 0.93; 'baby': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc :content-transfer-encoding; bh=gdxu5qMMiciUS3m6Pi1etjrUlx+H6GnNXHlRM0L7/Gs=; b=Zqrw0XYSipvQy19OuEpd4WcC1fpCpwUZ3L18BSWikohyGzP0YMJSZWn91mgoG1Wwx5 QeD8JeLiJbb04uJc5c72STkyzeZHNiEE6siuE/qLyRLIAfYgKZLXMz5iESy8UwGfEnTS hZg4UdLLQz6NTenJycKiLwCFc3IpucoFgOe/9IO0KvhJwpCoNnY1oys4w7YIWNAdLiHK 1/UpJCY1TM+nF2Vl6pwscBNgXpB3AUF7Pk3IZqCaEUoP+XoRR0qfG1T+04wv7CF/GPEY gudCf0H7j8vrB1XlrhPa+BcFC2y/zt1Q5l0odsVTvKhn565NQ12wg9tiDDPI34zxQGo6 Xl6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc:content-transfer-encoding; bh=gdxu5qMMiciUS3m6Pi1etjrUlx+H6GnNXHlRM0L7/Gs=; b=XBT4748Kz214RY/5QjfxTQrI05KLBB5/iA6posPobYVKpzBkLa8aho/J+fLza45L4f we+b/mIkQgY38z0cE+eO+hGWPZEbMZ6+TcnCtXuAGiE5W+iPETblccOYQkG020xWwz4c 7bPUUNsfmWjPHJo50I0nRQ7g2mlycqTaV+9Hzmvn/obATbevgrYVgL9kgsGtNwfKnLfA eS7PDLim0/r+4xiHNbd2Dnx8J9Cs/C2sKmGXT+akERnANOKOU/dv3/ZsKTy3eb4AGH/k Ghe3yEMYam+uHgXZz6qqbYJ7Tzy77qw3yjwb14cxT+ojxo1GdDQBQ/g1nx1Ufy/tYqA6 utAA== X-Gm-Message-State: AEkoousjXeLZC/SGt4ZuycPh4BnnZjGBzwRvcF871jRZLKNVUKzzt3kxF/GLrwNsiQIchbwVVe1itUcsGwP7Tg== X-Received: by 10.28.38.196 with SMTP id m187mr6066944wmm.81.1469896663471; Sat, 30 Jul 2016 09:37:43 -0700 (PDT) In-Reply-To: <758a1961-00bc-4b1c-834b-a7deca94d029@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <5792cd34$0$1587$c3e8da3$5496439d@news.astraweb.com> <87vazwppxx.fsf@elektro.pacujo.net> <579B1ABB.1070500@rece.vub.ac.be> <579c2095$0$22142$c3e8da3$5496439d@news.astraweb.com> <579cbded$0$1605$c3e8da3$5496439d@news.astraweb.com> <758a1961-00bc-4b1c-834b-a7deca94d029@googlegroups.com> Xref: csiph.com comp.lang.python:112088 On Sun, Jul 31, 2016 at 2:15 AM, Rustom Mody wrote: > Diff between > print "x" > and > print("x") > is one char =E2=80=94 the closing =E2=80=98)=E2=80=99 > > To make a dispute about that =E2=80=94 I=E2=80=99ll leave to BartC! > > The more general baby that is significant is that beginners should have > it easy to distinguish procedure and function and python does not natural= ly aid that. print was something procedure-ish in python2 but the general = notion being > absent is a much more significant problem (for beginners) than print. But Py2's print is not just a procedure. It's magical syntax. You can't create your own procedures. Why SHOULD they be special? Ultimately, a procedure is simply a function that has no useful return value; and there are myriad times when I've called a function or method for its side effects and ignored the return value. So do I need to be able to "call a function as if it were a procedure", or is there a stark difference between the two types of callable? Where, in any useful production code, is the difference between functions and procedures actually helpful? Or where, in student code, would it be useful to distinguish? I've been teaching Python to students with a variety of backgrounds, and nobody has yet been bothered by this. Not a single one. ChrisA