[Python-ideas] Statement local functions and classes (aka PEP 3150 is dead, say 'Hi!' to PEP 403)
David Townshend
aquavitae69 at gmail.com
Thu Oct 13 08:21:49 CEST 2011
After reading your earlier reply about the benefits of named functions, I'm
fully with you!
+1 to the PEP.
On Thu, Oct 13, 2011 at 7:54 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On Thu, Oct 13, 2011 at 3:51 PM, Carl M. Johnson
> <cmjohnson.mailinglist at gmail.com> wrote:
> >
> > On Oct 12, 2011, at 7:45 PM, David Townshend wrote:
> >
> >> A question: As I understand it, the function is never actually bound to
> its name, i.e. in your first example the name "report_destruction" doesn't
> exist after the statement. If this is the case, then there seems little
> point assigning a name at all other than for providing a description. In
> fact, assigning a name implies that it is reusable and that the name means
> something.
> >>
> >> I'm not sure I like the idea of allowing defs without a name, but
> perhaps its something to think about.
> >
> > -1 To me, the names are part of the documentation. The advantage of
> anonymous blocks is the block part, not the anonymous part.
>
> The "no namespace clashes" part is another benefit. PEP 403 attacks
> that by omitting the name binding in the current scope rather than by
> omitting the name entirely.
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20111013/4de9e783/attachment.html>
More information about the Python-ideas
mailing list