[Python-Dev] What it takes to change a single keyword. (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Sat Oct 1 17:52:29 CEST 2011


First of all, I am sincerely sorry if this is wrong mailing list to ask this question. I checked out definitions of couple other mailing list, and this one seemed most suitable. Here is my question:

In principle, python-list would be more appropriate, but this really is a border case. So welcome!

Let's say I want to change a single keyword, let's say import keyword, to be spelled as something else, like it's translation to my language. I guess it would be more complicated than modifiying Grammar/Grammar, but I can't be sure which files should get edited.

Hmm. I also think editing Grammar/Grammar should be sufficient. Try restricting yourself to ASCII keywords first; this just worked fine for me.

Of course, if you change a single keyword, none of the existing Python code will work anymore. See for yourself by changing 'def' to 'fed' (say).

Regards, Martin



More information about the Python-Dev mailing list