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

Petr Viktorin encukou at gmail.com
Fri Sep 4 00:55:10 CEST 2015

On Thu, Sep 3, 2015 at 11:27 PM,  <random832 at fastmail.us> wrote:
> On Thu, Sep 3, 2015, at 16:53, Al Sweigart wrote:
>> https://github.com/asweigart/idle-reimagined/wiki/Turtle-Translations
> A couple of downsides I noticed:
> "The names will later be formatted to fit the code style of the turtle
> module. " is a bit handwavy, to be honest. Are things like "de la"
> required or optional? Should an apostrophe/space/hyphen become an
> underscore or be omitted? What can be abbreviated? What
> case/inflection/conjugation should be used? These are decisions that
> have to be made by native speakers based on what will be understandable
> to beginners who know each language.
> Your names aren't very consistent - I don't know French that well, but I
> doubt the module would benefit from mixing "plume", "crayon", and
> "stylo". What to call a pen needs to be decided at a high level and used
> globally. Also, things like "set...", "get...", "on...", need to be
> translated to something consistent throughout the module.
> For that matter, the naming conventions in the *English* ones are a bit
> questionable and inconsistent. Maybe this is an opportunity to clean up
> that API.
> Also, a bug to report: I know enough Spanish to know that "pantalla
> clara" means "clear screen" as a noun [screen that is clear], not a verb
> [clearing the screen]. The English is ambiguous, but most other
> languages are not.
> For design questions: Is it important to hide the English names? Is it
> important to be able to use the classes interchangeably to code that is
> written to use a different language's method names? Can the same name in
> one language ever translate to two different names in another language
> depending on context?

I would not be surprised if, among all languages in the world, there'd
be a clash in one of turtle's attribute names.

Why put everything in the same namespace? It might be better to use
more of those – perhaps something like "from turtle.translations
import tortuga" ("tortuga" being Spanish for turtle). That is probably
too long, so why not just "import tortuga"? That "tortuga" module
could live on PyPI for a while, before it's considered for addition to
either the stdlib, or just the installers.

More information about the Python-ideas mailing list