1.1 --- a/docs/invocation.txt Wed Aug 27 00:45:14 2008 +0200
1.2 +++ b/docs/invocation.txt Mon Sep 01 01:32:32 2008 +0200
1.3 @@ -93,11 +93,13 @@
1.4
1.5 f(obj, 1, 2) # f known as C at compile-time
1.6
1.7 - f -> C.__new__ - don't get any context information
1.8 - -> any __init__ method will be called from C.__new__
1.9 - obj -> argument #1
1.10 - 1 -> argument #2
1.11 - 2 -> argument #3
1.12 + f -> C.__init__
1.13 + -> new instance is argument #1
1.14 + obj -> argument #2
1.15 + 1 -> argument #3
1.16 + 2 -> argument #4
1.17 +
1.18 + The new instance must be manually provided as the result after the call.
1.19
1.20 Argument lists for unknown callables:
1.21
1.22 @@ -116,6 +118,24 @@
1.23
1.24 <context> is instance: no change
1.25
1.26 +Argument lists in instantiators:
1.27 +
1.28 + f(obj, 1, 2) # f not known at compile-time
1.29 +
1.30 + f -> C.__new__ (known and called at run-time)
1.31 +
1.32 + Need to call C.__init__(<instance>, obj, 1, 2), preferably with the existing
1.33 + frame:
1.34 +
1.35 + <insert instance before received arguments>
1.36 + obj -> argument #1
1.37 + 1 -> argument #2
1.38 + 2 -> argument #3
1.39 +
1.40 + Then jump without switching frames.
1.41 + It should be possible to replace the old, tentative context information in the
1.42 + frame.
1.43 +
1.44 Defaults for unknown callables:
1.45
1.46 f(obj) # f not known at compile-time