Defining metaclass instance methods inside of the metaclass factory instead of the metaclass itself - flawed design?
It would seem to me that a simpler way (without a metaclass) to do more or less the same would be


Define a base class SlottedClass with empty __slots__.
Define  __init__, __call__, __repr__ etc. as normal instance methods in SlottedClass.
The class factory only needs to set __slots__ on the subclass it creates:

def mesh_class(name, fields):
    if isinstance(fields, str): 
        fields = fields.replace(',',' ').split()
    ##Test for repeated fields
    if len(set(fields)) &lt; len(fields): 
        raise Exception
    ##Test for fields beginning with underscore
    for field in fields:
        if field[0] == '_': 
            raise Exception
    new_class = type(name, (SlottedClass,), {'__slots__': fields})
    return new_class



Note by the way that list.sort() sorts in place and always returns None, so the code below does not do what it says. I've fixed it the code above.

    ##Test for repeated fields
    if list(set(fields)).sort() != list(fields).sort(): raise Exception