Please translate this easy snip of C++ to Python
thomas at xs4all.net
Sun Feb 4 18:00:09 EST 2001
On Sun, Feb 04, 2001 at 01:58:17PM -0700, bowman wrote:
> Fredrik Lundh <fredrik at effbot.org> wrote in message news:BTif6.12144
> > (iirc, bjarne thinks that real C++ programmers shouldn't
> > use the preprocessor at all, but what does he know...)
> "The C preprocessor is a powerful but blunt tool, however, and macros are a
> dangerous way to program because they change the lexical structure of the
> program underfoot. Let the language proper do the work."
> Kernighan & Pike, _The Practice of Programming_.
> iirc, either K or R have mentioned they would have left macros out of the
> language if they could have forseen the clever and wondrous uses that would
> be found for them.
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 :)
Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
More information about the Python-list