(mcs, name, slots)
return Element
Generates a simple class that has the given slots and nothing else
Generates a simple class that has the given slots and nothing else
Generates a simple class that has the given slots and nothing else
def record_generator(mcs, name, slots):
        """Generates a simple class that has the given slots and nothing else"""

        class Element:
            """A simple class that holds the attributes collected by the
            attribute collector"""

            __slots__ = tuple(slots)

            def __init__(self, attrs=()):
                for attr, value in attrs:
                    setattr(self, attr, value)

        Element.__name__ = name
        return Element
def record_generator ( mcs , name , slots ) : class Element : """A simple class that holds the attributes collected by the
            attribute collector""" __slots__ = tuple ( slots ) def __init__ ( self , attrs = ( ) ) : for attr , value in attrs : setattr ( self , attr , value ) Element . __name__ = name return Element