No macros in Python
Ben Leslie
benno at sesgroup.net
Sun Dec 15 19:33:32 EST 2002
On Sun, 15 Dec 2002, Peter Hansen wrote:
> Mike Meyer wrote:
> >
> > Python doesn't have macros. On the other hand, looking at the world
> > through OO glasses rather than S-expression glasses means you don't
> > need macros as often. But the topic comes up at irregular intervals,
> > so someone may eventually come up with a way of doing macros in Python
> > that is right - at which point it'll be added.
>
> I haven't heard this expressed as a disadvantage very often, perhaps
> not before in this group since I've been reading it.
>
> In what way would macros (as I understand them... from C for example)
> improve Python, other than possibly a small improvement in performance?
If you really wanted C style macros you could always run you code through
the C preprocessor.
Benno
More information about the Python-list
mailing list