[Python-ideas] Non-English names in the turtle module.

Stephen J. Turnbull stephen at xemacs.org
Sat Sep 5 08:46:09 CEST 2015

Al Sweigart writes:

 > If we could minimize it down to less than a dozen Python keywords &
 > names (import turtle, for, in, range, while, if, else) that would
 > be a significant gain for Python's reach.

I don't see why you would want any non-localized identifiers (modules,
functions) at all in the base feature set.  So you can (and I think
should) drop range and turtle.  I don't see any point in discussing
the keywords here -- they are what they are.  If a student decides to
use something weird like "continue" or "try ... finally" it will work.

Of course, the recommended set of syntaxes and their associated
keywords matter a lot pedagogically, but we can leave that discussion
to the pedagogues.  When you're wearing your pedagogue hat and
actually writing the style guide for teaching programming using
turtle, then those interested can talk about that.  Or maybe that
should be left to experimentation.  Some teachers may prefer to avoid
"while condition: suite" in of "for i in iterable: if condition: suite".
(Normally that would be nuts, of course, but here you could reduce the
base set of keywords and syntaxes by one each.)

There may be reasons why advanced users (and teachers) might want to
use "non-base" facilities.  There it's possible to do things like

>>> from builtins import range as interval, print as output
>>> for i in interval(2): output(i)

which allows teachers to add any extensions they like conveniently,
albeit verbosely.

I still think an i18n-based architecture is the way to go, to minimize
such boilerplate (error-prone for translators) among other reasons.
Neither users nor translators need to see it, unless they want to see
"how'd they do that?"  In which case, isn't more "educational" to show
them the way it's done in the real world?

More information about the Python-ideas mailing list