No problem. You just need to write the function and include it in the dictionary that you pass to type
under the key '__init__'
def func(self,*args,**kwargs):
self.args = args
for k,v in kwargs.items():
setattr(self,k,v)
MyClass = type('Employee',(object,),{'__init__':func})
e = MyClass(name='john')
print (e.name) #'john'
You can even "delete" func
when you're done creating the class if it makes you feel better about keeping your namespace clear:
MyClass = type('Employee',(object,),{'__init__':func})
#clean up, clean up, everybody everywhere, clean up clean up, everybody do your share ...
del func