@memoize
def mixin(*args):
 if (len(args) == 1):
  return args[0]
 name = ('Mixin_%s' % '_'.join((cls.__name__ for cls in args)))
 return type(name, args, {})

@ memoize def mixin ( * args ) : if ( len ( args ) == 1 ) : return args [ 0 ] name = ( 'Mixin_%s' % '_' . join ( ( cls . __name__ for cls in args ) ) ) return type ( name , args , { } )
dynamically creates a class that inherits from all the classes passed as parameters .