<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 29, 2014 at 4:43 AM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For that last point, my interest is as much educational as it is in<br>
easing the transition from Python 2. The parentheses in "print('Hello<br>
world!')" mean introducing the idea of function calls early to explain<br>
how it works, while being able to omit them makes it easier to gloss<br>
over the distinction between statements and function calls initially<br>
and then cover it later after the basics of flow control have been<br>
nailed down.<br></blockquote><div><br></div><div>I've been doing a lot of intro-to-python teaching lately (py2 so far...), and I understand this desire. IN fact, a lot of notes point to the fact that python's "hello world" is simply : print "hello world", rather than what is required in some languages to do something that simple.</div>

<div><br></div><div>However, I also believe that when teaching it's better to introduce the "right way" to do something up front, rather than a "beginners' way", then later say, well, you really SHOULD do it this other way... So if we want our students to use print as a function, we might a well start them off that way. Saying that their very first easy program is:</div>

<div><br></div><div>print("hello world")</div><div><br></div><div>is fine -- they don't have to know or understand what a function call is -- they simply copy the syntax. And frankly, we get to simple function calls, VERY early in the program -- you can't really do anything without them...</div>

<div><br></div><div>In fact, in my latest class, we've made an effort to introduce forward-thinking up front, even before we explain quite what it all means:</div><div><br></div><div>use u"a string" to make a string</div>

<div><br></div><div>you write a class like:</div><div><br></div><div>class C(object):</div><div>   ...</div><div><br></div><div>before we talk about subclassing, or what "object" is...</div><div><br></div><div>
just my $0.02</div>
<div><br></div><div>-Chris</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Cheers,<br>
Nick.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/chris.barker%40noaa.gov" target="_blank">https://mail.python.org/mailman/options/python-dev/chris.barker%40noaa.gov</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>

Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a>
</div></div>