288 def __init__( self, name, bases, dict ):
289 if '__slots__' not in dict:
290 raise TransformConfigError('Class %s does not have member __slots__. Please add __slots__ = ()'
291 ' to the class definition' % (name,) )
292
293
294
295
296 slots = self.__slots__
297 descrName = '__properties'
298 if descrName not in slots:
299
300 slots += ( descrName, )
301
302 dict['__slots__'] = slots
303
304 setattr(self,descrName,[])
305 descrList = getattr(self,descrName)
306
307 for n,attrib in dict.items():
308 if isinstance(attrib,Descriptor):
309 setattr(attrib,'_Descriptor__name',n)
310 descrList.append(attrib)
311
312 type.__init__(self,name,bases,dict)
313
314
315