[Geany-devel] [PATCH] Report lambdas as functions in Python tagmanager

Lex Trotman elextr at xxxxx
Tue Mar 16 23:04:05 UTC 2010


2010/3/17 Enrico Tröger <enrico.troeger at uvena.de>

> On Tue, 16 Mar 2010 19:23:32 +0100, Colomban wrote:
>
> >Hi,
> >
> >Nick Treleaven a écrit :
> >> On Thu, 11 Mar 2010 15:29:48 +0100
> >> Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> >>
> >>> Here's a small patch that adds support for lambdas in the Python
> >>> tagmanager. What it does it report Python's lambdas as functions
> >>> (with arguments) rather than as variables. Nested lambda are
> >>> supported too.
> >>
> >> I haven't tried it but do we really want this? Aren't lambda
> >> functions supposed to be short and limited to local scope? We don't
> >> parse other local things other than nested functions, but they can
> >> be quite long.
> >
> >I don't know if lambda are "supposed" to be local, but I personally
> >tend to use them for most of very small functions, regardless they are
> >local or not. But don't trust me for Python's "good practices".
>
> I'd say if ever lamda's are used as some kind of anonymous functions or
> just short forms of longer terms.
> But I also doubt it would be useful to generate tags of them and so
> list them in the symbol list.
>
> Regards,
> Enrico
>

IIUC lambdas are anonymous so generating tags would be questionable but
scope effects would be useful

Cheers
Lex

>
> --
> Get my GPG key from http://www.uvena.de/pub.asc
>
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20100317/fbec95ce/attachment.html>


More information about the Devel mailing list