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

Nick Treleaven nick.treleaven at xxxxx
Wed Mar 17 13:43:35 UTC 2010


On Tue, 16 Mar 2010 19:23:32 +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".

Actually maybe I'm wrong, probably lambdas can be used e.g. as
class members.

I see that the patch might be useful to show toplevel lambdas in
scripts or class member lambdas in the symbol list.

Now committed with above modification, thanks.

Regards,
Nick



More information about the Devel mailing list