Draft Pep (was: Re: Let's Talk About Lambda Functions!)
Terry Reedy
tjreedy at udel.edu
Tue Aug 6 11:50:58 EDT 2002
"Paul Rubin" <phr-n2002b at NOSPAMnightsong.com> wrote in message
news:7xd6swhvit.fsf at ruckus.brouhaha.com...
> "Terry Reedy" <tjreedy at udel.edu> writes:
> > def fname params: body
> >
> > is syntactic sugar for
> >
> > fname = _internal_defun('fname', 'params', 'body')
> >
> > that avoids have to quote stuff and write fname twice. Same true
of
> > class and import statement.
>
> What the heck is _internal_defun? Typing it gets NameError in
Python 2.2.
It's a hypothetical name that I made up! It's also an alternative to
your proposal that would have the same relation to def that
__import__() (real name) has to import and that metaclass calls have
to class.
TJR
More information about the Python-list
mailing list