Changing the names of python keywords and functions
bignose+hates-spam at benfinney.id.au
Fri Jun 22 01:59:32 CEST 2007
"Martin v. Löwis" <martin at v.loewis.de> writes:
> (unattributed author) wrote:
> > "<<koristiti>> OS"- (THIS IS MY IMAGINARY EXAMPLE OF KEYWORD),
> > my program must write this code in some user file, but my
> > program must read this command like: "import os".How
> > can I do something like that??
> The keywords are listed in Grammar/Grammar. You need to edit
> this file, then recompile.
To clarify, are you suggesting changing the source code of the Python
implementation and recompiling it?
If the keywords are changed in the Python executable, won't that break
the import of any Python module written for the standard keywords --
such as many of those in the standard library?
My understanding of the original poster's requirement was that the
keywords should be additional to, not replacement for, the existing
\ "The way to build large Python applications is to componentize |
`\ and loosely-couple the hell out of everything." -- Aahz |
More information about the Python-list