SmartDict: Make SmartDict an attrdict

This commit is contained in:
Nathan Binkert 2010-02-28 19:28:09 -08:00
parent ebdd004eb2
commit 25aac791de

View file

@ -43,6 +43,7 @@
from convert import * from convert import *
from attrdict import attrdict
class Variable(str): class Variable(str):
"""Intelligent proxy class for SmartDict. Variable will use the """Intelligent proxy class for SmartDict. Variable will use the
@ -109,7 +110,7 @@ class UndefinedVariable(object):
def __nonzero__(self): def __nonzero__(self):
return False return False
class SmartDict(dict): class SmartDict(attrdict):
"""Dictionary class that holds strings, but intelligently converts """Dictionary class that holds strings, but intelligently converts
those strings to other types depending on their usage""" those strings to other types depending on their usage"""