def customClass(classes, argStr):
 (cname, args, kwargs) = splitArgs(argStr)
 cls = classes.get(cname, None)
 if (not cls):
  raise Exception(('error: %s is unknown - please specify one of %s' % (cname, classes.keys())))
 if ((not args) and (not kwargs)):
  return cls
 return specialClass(cls, append=args, defaults=kwargs)

def customClass ( classes , argStr ) : ( cname , args , kwargs ) = splitArgs ( argStr ) cls = classes . get ( cname , None ) if ( not cls ) : raise Exception ( ( 'error: %s is unknown - please specify one of %s' % ( cname , classes . keys ( ) ) ) ) if ( ( not args ) and ( not kwargs ) ) : return cls return specialClass ( cls , append = args , defaults = kwargs )
return customized class based on argstr the args and key/val pairs in argstr will be automatically applied when the generated class is later used .