GenericAtom class

This commit is contained in:
Marat Valiev 2012-02-08 02:40:21 +00:00
parent 494cb7bb2a
commit dec9058455

View file

@ -0,0 +1,32 @@
'''
Created on Feb 7, 2012
@author: marat
'''
import sys
from types import *
class GenericAtom:
'''
classdocs
'''
def __init__(self,d=None):
'''
Constructor
'''
if d is None:
self.dict = {}
else:
if type(d) is not type({}):
print "wrong type ", type(d)
print "expecting", type({})
sys.exit(1)
else:
self.dict = d
if __name__ == '__main__':
a=GenericAtom({})
print a