1.1 --- a/docs/concepts.txt Sun May 31 18:44:40 2009 +0200
1.2 +++ b/docs/concepts.txt Mon Jun 01 02:41:57 2009 +0200
1.3 @@ -399,6 +399,26 @@
1.4 g 1 2 3
1.5 h 1 2
1.6
1.7 +Confusion can occur when functions are adopted as methods, since the context
1.8 +then occupies the first slot in the invocation frame:
1.9 +
1.10 + def f(x, y, z):
1.11 + pass
1.12 +
1.13 + f(x=1, y=2, z=3) -> f(<context>, 1, 2, 3)
1.14 + -> f(1, 2, 3)
1.15 +
1.16 + class C:
1.17 + f = f
1.18 +
1.19 + def g(x, y, z):
1.20 + pass
1.21 +
1.22 + c = C()
1.23 +
1.24 + c.f(y=2, z=3) -> f(<context>, 2, 3)
1.25 + c.g(y=2, z=3) -> C.g(<context>, 2, 3)
1.26 +
1.27 Just as with parameter tables, a displacement list can be prepared from a
1.28 parameter table:
1.29