1.1 --- a/docs/concepts.txt Sat May 16 01:34:03 2009 +0200
1.2 +++ b/docs/concepts.txt Sun May 17 00:58:27 2009 +0200
1.3 @@ -189,16 +189,14 @@
1.4 certain common features and operations are supported in the same way for all
1.5 of these things. To permit this, a common data structure format is used.
1.6
1.7 - Header............................................................................ Attributes.....
1.8 + Header.................................................... Attributes.................
1.9
1.10 - Identifier Identifier Address Details Identifier Size Object Object ...
1.11 + Identifier Identifier Address Identifier Size Object Object ...
1.12
1.13 - 0 1 2 3 4 5 6 7 8
1.14 - classcode attrcode/ invocation invocation funccode size __class__ attribute ...
1.15 - instance reference #args, reference reference
1.16 - status defaults,
1.17 - * parameter
1.18 - details
1.19 + 0 1 2 3 4 5 6 7
1.20 + classcode attrcode/ invocation funccode size __class__ attribute ...
1.21 + instance reference reference reference
1.22 + status
1.23
1.24 Classcode
1.25 ---------
1.26 @@ -221,7 +219,8 @@
1.27 removed and the attrcode is not specified for classes: the presence of an
1.28 attrcode indicates that a given object is an instance.
1.29
1.30 -See below for details of attrcodes.
1.31 +See the "Testing Instance Compatibility with Classes (Attrcode)" section below
1.32 +for details of attrcodes.
1.33
1.34 Invocation Reference
1.35 --------------------
1.36 @@ -231,15 +230,20 @@
1.37 This is the address of the code to be executed when an invocation is performed
1.38 on the object.
1.39
1.40 -Invocation Arguments
1.41 ---------------------
1.42 +Funccode
1.43 +--------
1.44
1.45 -Used when an object is called.
1.46 +Used to look up argument positions by name.
1.47
1.48 -The argument details consist of the number of positional arguments involved in
1.49 -an invocation, the number of defaults available to compensate for missing
1.50 -arguments, and whether a star (*) parameter is available to accept superfluous
1.51 -arguments.
1.52 +The strategy with keyword arguments in micropython is to attempt to position
1.53 +such arguments in the invocation frame as it is being constructed.
1.54 +
1.55 +See the "Parameters and Lookups" section for more information.
1.56 +
1.57 +Size
1.58 +----
1.59 +
1.60 +Used to indicate the number of attributes associated with an object.
1.61
1.62 Attributes
1.63 ----------
1.64 @@ -254,37 +258,31 @@
1.65
1.66 Class C:
1.67
1.68 - 0 1 2 3 4 5 6 7 8
1.69 - classcode (unused) __new__ __new__ funccode size class type attribute ...
1.70 - for C reference #args, for reference reference
1.71 - defaults, instantiator
1.72 - * parameter
1.73 - details
1.74 + 0 1 2 3 4 5 6 7
1.75 + classcode (unused) __new__ funccode size class type attribute ...
1.76 + for C reference for reference reference
1.77 + instantiator
1.78
1.79 Instance of C:
1.80
1.81 - 0 1 2 3 4 5 6 7 8
1.82 - classcode attrcode C.__call__ C.__call__ funccode size class C attribute ...
1.83 - for C for C reference #args, for reference reference
1.84 - (if exists) defaults, C.__call__
1.85 - * parameter
1.86 - details
1.87 + 0 1 2 3 4 5 6 7
1.88 + classcode attrcode C.__call__ funccode size class C attribute ...
1.89 + for C for C reference for reference reference
1.90 + (if exists) C.__call__
1.91
1.92 Function f:
1.93
1.94 - 0 1 2 3 4 5 6 7 8
1.95 - classcode attrcode code code funccode size class attribute ...
1.96 - for for reference #args, function (default)
1.97 - function function defaults, reference reference
1.98 - * parameter
1.99 - details
1.100 + 0 1 2 3 4 5 6 7
1.101 + classcode attrcode code funccode size class attribute ...
1.102 + for for reference function (default)
1.103 + function function reference reference
1.104
1.105 Module m:
1.106
1.107 - 0 1 2 3 4 5 6 7 8
1.108 - classcode attrcode (unused) (unused) module type attribute ...
1.109 - for m for m reference (global)
1.110 - reference
1.111 + 0 1 2 3 4 5 6 7
1.112 + classcode attrcode (unused) module type attribute ...
1.113 + for m for m reference (global)
1.114 + reference
1.115
1.116 The __class__ Attribute
1.117 -----------------------