import sys
from pyemvtlv.types.tags.taglist import doftags


class BaseTag(object):
    _tagid = None


class TagModule(object):
    def __init__(self, doftags):
        self.__doftags = doftags
        self.__all__ = list(doftags.iterkeys())
        for item in doftags:
            self.__dict__[item] = self.createTagClass(item, doftags[item])

    def createTagClass(self, name, tagid):
        return type(name, (BaseTag, ), {"_tagid": tagid})

sys.modules[__name__] = TagModule(doftags)

@@ -167,31 +167,110 @@
     
-self.__doftags = doftag
+# store the tags, jic%0A        self.__doftags = doftags%0A        # define the list of exported attribute
 s%0A  
@@ -315,16 +315,45 @@
 keys())%0A
+        # create our classes%0A
         
@@ -449,16 +449,16 @@
 item%5D)%0A%0A
-
     def 
@@ -492,16 +492,101 @@
 tagid):%0A
+        %22%22%22%0A        Creates a class named %60name%60 with a tagid of %60tagid%60%0A        %22%22%22%0A
         

comment TagModule