1.1 --- a/README.txt Mon Feb 25 00:54:11 2008 +0100
1.2 +++ b/README.txt Wed Feb 27 23:17:19 2008 +0100
1.3 @@ -39,6 +39,31 @@
1.4 object context
1.5 reference reference
1.6
1.7 +Acquiring Values
1.8 +----------------
1.9 +
1.10 +Values are acquired through name lookups and attribute access, yielding
1.11 +the appropriate object reference together with a context reference as
1.12 +indicated in the following table:
1.13 +
1.14 + Type of Access Context Notes
1.15 + -------------- ------- -----
1.16 +
1.17 + Local name Preserved Functions provide no context
1.18 +
1.19 + Global name Preserved Modules provide no context
1.20 +
1.21 + Class-originating Accessor Methods acquire the context of their
1.22 + attribute -or- accessor if an instance...
1.23 + Preserved or retain the original context if the
1.24 + accessor is a class
1.25 +
1.26 + Instance-originating Preserved Methods retain their original context
1.27 + attribute
1.28 +
1.29 +There is some scope for simplifying the above, to the detriment of Python
1.30 +compatibility, since the unbound vs. bound methods situation can be confusing.
1.31 +
1.32 Objects
1.33 -------
1.34
2.1 --- a/test.py Mon Feb 25 00:54:11 2008 +0100
2.2 +++ b/test.py Wed Feb 27 23:17:19 2008 +0100
2.3 @@ -7,6 +7,10 @@
2.4 for i, x in enumerate(importer.get_image()):
2.5 print i, x
2.6
2.7 +def attrs(obj):
2.8 + for name, attr in obj.items():
2.9 + print name, attr
2.10 +
2.11 i = micropython.Importer(sys.path, "-v" in sys.argv)
2.12 try:
2.13 if len(sys.argv) < 2: