Op woensdag 2 juli 2008, schreef Han-Wen Nienhuys:
> I know what a decorator is - I'm sorry for thinking it didn't work,
> but the code is a bit obtuse, and I got confused by
>
>  return lambda f: conversions.append ((version, f, message))
>
> which stores the conv function, but then will also redefine the conv
> function to None.  Essentially it does
>
> def dec(f):
>     return None
>
> @dec
> def f(x):
>     return 1
>
> print f
>
> =>
>
> None

Yes, the function is not returned by the decorator because it needs not to be 
stored in 'conv'; it would be overwritten anyway by the next rule. (In the 
current situation the value of conv also changes after every function 
redefinition).

> Can you document this more clearly so it does not look so strange?

Ok. Does everybody like the syntax of a rule like this?

> Also the patch should look like a proper commit, with description
> prepended and your name attached as author.

I don't know exactly how to do that, but I'll try to find out :)

cheers,
Wilbert Berendsen

-- 
LilyKDE, LilyPond for KDE: http://lilykde.googlecode.com/


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to