[Python-Dev] Needing help to change the grammar

Terry Reedy tjreedy at udel.edu
Sun Apr 12 22:30:28 CEST 2009

Harry (Thiago Leucz Astrizi) wrote:

> Yes, I have plans to ask for help in the brazilian Python mailing list
> when I finish to prepare the C source code for this project. Then I
> expect to receive help to translate the python modules for this new
> language. There's a lot of work to do.

There are only a few modules that you really need to do this for for 
beginners.  Trying to convert the entire stdlib, let alone other stuff 
on pypi, strikes me as foolish.


> Yes, I know. To a more "serious" programmer, it's essential to have a
> basic understanding in english and would be better for him to start
> with the real Python. But my intent is not to substitute Python in
> Brazil, but to create a new language that could be learned easily by
> younger people for educational purposes. My intent is to show them how
> a computer software works. But surely I will warn my students that to
> take programming more seriously, it's important to learn how to
> program in some other language, like the original Python. But thanks
> for the advice.

If possible, and I presume it is, make your interpreter dual language. 
Source code in .py files is parsed as now (and module compiles to .pyc). 
  Source in .pyb (python-brazil) is parsed with with your new parser, 
and get a brazilian equivalent of builtins, but use the same AST and 
bytecode.  Bytecode is neither English nor Brazilian ;-).  This would 
give your students access to the whole world of Python modules and allow 
  those who want to move to normal English-based international Python to 
do so without obsoleting their existing work.

Terry Jan Reedy

PS. Since this thread is not about developing Python itself, it would be 
more appropriate on the python-ideas list if continued much further.

PPS Once unicode identifiers were allowed, I considered it inevitable 
that people would also want native-language keywords, especially for 
younger students.  So I expected a project like yours, though I expected 
the first to be in Asia.  I think dual language versions, if possible, 
would be the way to do this without ghettoizing the national versions. 
But as I said, a general discussion of this belongs on python-ideas.

More information about the Python-Dev mailing list