Commit 6265044b authored by Evan Simpson's avatar Evan Simpson

Simplified record class implementation

parent 62cdf622
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.30 $'[11:-2] __version__='$Revision: 1.31 $'[11:-2]
import regex, sys, os, string import regex, sys, os, string
from string import lower, atoi, rfind, split, strip, join, upper, find from string import lower, atoi, rfind, split, strip, join, upper, find
...@@ -983,10 +983,7 @@ class record: ...@@ -983,10 +983,7 @@ class record:
def __getattr__(self, key, default=None): def __getattr__(self, key, default=None):
if key in ('get', 'keys', 'items', 'values', 'copy', 'has_key'): if key in ('get', 'keys', 'items', 'values', 'copy', 'has_key'):
return getattr(self.__dict__, key) return getattr(self.__dict__, key)
try: raise AttributeError, key
return self.__dict__[key]
except KeyError, kerr:
raise AttributeError, kerr, sys.exc_info()[2]
def __getitem__(self, key): def __getitem__(self, key):
return self.__dict__[key] return self.__dict__[key]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment