Thanks to you both, I have made some progress on introducing my own keywords to python interpreter. I think it is very kind of you to answer my question. I think I can take it from here. Thanks again :)
02 Ekim 2011 05:42 tarihinde Nick Coghlan <ncogh...@gmail.com> yazdı: > 2011/10/1 "Martin v. Löwis" <mar...@v.loewis.de>: > >> 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. > > For any changes where that isn't sufficient, then > http://docs.python.org/devguide/grammar.html provides a helpful list > of additional places to check (and > http://docs.python.org/devguide/compiler.html provides info on how it > all hangs together). > > However, rather than *changing* the keywords, it would likely be > better to allow *alternate* keywords to avoid the problem Martin > mentioned with existing Python code failing to run (including the > entire standard library). > > Cheers, > Nick. > > -- > Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia > -- http://yasar.serveblog.net/
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com