Not sure exactly where it changed.
buf[key] = self.loadtagged(fp, tag)
def makeobjtype(self, nm):
- return data.namedtype(str(nm), (data.obj, object), {}, typename=nm)
+ return data.namedtype.make(str(nm), (data.obj, object), {}, typename=nm)
def loadobj(self, fp, ref=False):
if ref:
self.typename = typename
return self
+ @classmethod
+ def make(cls, *args, typename=None, **kwargs):
+ self = cls(*args, **kwargs)
+ self.typename = typename
+ return self
+
class obj(object):
def __getitem__(self, key):
return self.__dict__[key]