1.1 --- a/micropython/table.py Sun Oct 25 18:35:53 2009 +0100
1.2 +++ b/micropython/table.py Mon Oct 26 00:23:36 2009 +0100
1.3 @@ -211,6 +211,20 @@
1.4 self.displaced_list = None
1.5 self.raw = None
1.6
1.7 + def access(self, objname, attrname):
1.8 +
1.9 + "Return the attribute entry for the given 'objname' and 'attrname'."
1.10 +
1.11 + try:
1.12 + entry = self.table[objname]
1.13 + except KeyError:
1.14 + raise TableError, "Name %r is not registered as an object in the table." % objname
1.15 +
1.16 + try:
1.17 + return entry[attrname]
1.18 + except KeyError:
1.19 + raise TableError, "Name %r is not registered as an attribute in the table." % attrname
1.20 +
1.21 def add(self, objname, attributes):
1.22
1.23 "For the given 'objname' add the given 'attributes' to the table."