[Python-Dev] Language Summit Follow-Up

Nick Coghlan ncoghlan at gmail.com
Sat May 31 04:05:06 CEST 2014


On 31 May 2014 02:47, "Chris Barker" <chris.barker at noaa.gov> wrote:
> 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:
>
> print("hello world")
>
> 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...

OK, that's a fair criticism of that particular argument, so I'll stop using
it. There are others, though:

* improve consistency between IPython's existing implied call support and
vanilla Python 3.5+
* retroactively make a lot of Python 2 examples also valid for Python 3.5+
* ease the migration to Python 3 for ad hoc utility scripts (which often
use print heavily)
* reduce the syntactic noise in migration patches (although large
applications tend to use print less than scripts do)
* largely eliminate one of the *human* barriers to migration from Python 2
(forgetting the parens for print at the interactive console and in ad hoc
scripts)

I already have too many other things on my todo list to work this up into a
full PEP, but the proof of concept (along with IPython's existing support)
shows there's no *technical* barrier to adding the feature. It's a question
of whether or not we *want* to blur the boundary between simple statements
and simple imperative function calls like that.

Cheers,
Nick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140531/510ed181/attachment.html>


More information about the Python-Dev mailing list