1.1 --- a/docs/invocation.txt Sun May 31 18:44:40 2009 +0200
1.2 +++ b/docs/invocation.txt Mon Jun 01 02:41:57 2009 +0200
1.3 @@ -163,6 +163,23 @@
1.4
1.5 Approach #2 - add arguments, add defaults while checking frame
1.6
1.7 +Defaults for lambda functions:
1.8 +
1.9 + f = lambda x, y=default: ...
1.10 +
1.11 + Defines instance of f with method:
1.12 +
1.13 + def <lambda>(<context>, x, y=default):
1.14 + ...
1.15 +
1.16 + Where default is attribute #1.
1.17 +
1.18 + f(obj) # f not known at compile-time
1.19 +
1.20 + f -> f
1.21 + -> load context for argument #1 (f, since an instance is referenced)
1.22 + obj -> argument #2
1.23 +
1.24 Functions as methods:
1.25
1.26 def f(x, y, z): ...