inline functions or macros?

Terry Reedy tjreedy at home.com
Sun Dec 2 17:10:19 EST 2001


"Michael Kelly" <mkelly2002NOSPAM at earthlink.net> wrote in message
news:5l7l0ug2e32l8h5393t5s4ulg3jc4mhsp1 at 4ax.com...
> On Sun, 02 Dec 2001 21:06:25 GMT, Maciej Kalisiak
> <mac at dgp.toronto.edu> wrote:
>
> >I seem to recall reading that function calls in Python are somewhat
> >expensive.  I come from a C++ background, and there this is usually
> >dealt with by defining frequently used small functions as 'inline'.
> >Is there something similar in Python?
>
> There's a "lamda" inline function definition
> mechanism but I'm new to Python so I
> don't know if it's run-time efficient or
> just a syntactic convenience yet.

The latter (syntax convenience).

Terry J. Reedy






More information about the Python-list mailing list