1.1 --- a/micropython/data.py Sun May 11 21:50:30 2008 +0200
1.2 +++ b/micropython/data.py Mon May 12 23:54:16 2008 +0200
1.3 @@ -197,13 +197,23 @@
1.4 def __repr__(self):
1.5 return "Attr(%r, %r, %r, %r, %r)" % (self.position, self.parent, self.name, self.value, self.assignments)
1.6
1.7 +# Instances are special in that they need to be wrapped together with context in
1.8 +# a running program, but they are not generally constant.
1.9 +
1.10 +class Instance:
1.11 +
1.12 + "A placeholder indicating the involvement of an instance."
1.13 +
1.14 + def __repr__(self):
1.15 + return "Instance()"
1.16 +
1.17 class Constant:
1.18
1.19 "A superclass for all constant or context-free structures."
1.20
1.21 pass
1.22
1.23 -class Const(Constant):
1.24 +class Const(Constant, Instance):
1.25
1.26 "A constant object with no context."
1.27
1.28 @@ -774,14 +784,4 @@
1.29
1.30 return dict(self)
1.31
1.32 -# Instances are special in that they need to be wrapped together with context in
1.33 -# a running program, but they are not generally constant.
1.34 -
1.35 -class Instance:
1.36 -
1.37 - "A placeholder indicating the involvement of an instance."
1.38 -
1.39 - def __repr__(self):
1.40 - return "Instance()"
1.41 -
1.42 # vim: tabstop=4 expandtab shiftwidth=4