Please translate this easy snip of C++ to Python
Moshe Zadka
moshez at zadka.site.co.il
Mon Feb 5 06:16:50 EST 2001
On Mon, 5 Feb 2001 00:00:09 +0100, Thomas Wouters <thomas at xs4all.net> wrote:
> Note how Python lacks a preprocessor and macros :) People occasionally rally
> for a macro preprocessor, but usually not of the C type. Being fairly
> ignorant in languages featuring macros other than the C style, I can't
> really say what they *are* rallying for, but apparently there are sane macro
> preprocessors in existance, somewhere :)
If I'm in a mood to annoy Guido, I propose hygienic(sp?) macros, like
in R5RS. These are things which are macros, but on the verge on being
functions: no accidental name collision, for one. Real macros work on
the parser level, not the tokenizer levels, so you can't do idiotic
stuff like
#define BEGIN {
#define END ;}
Or other shoot-on-sight offense.
--
Moshe Zadka <sig at zadka.site.co.il>
This is a signature anti-virus.
Please stop the spread of signature viruses!
Fingerprint: 4BD1 7705 EEC0 260A 7F21 4817 C7FC A636 46D0 1BD6
More information about the Python-list
mailing list