def _make_user_class(session, name):
attrs = session.eval('<STR_LIT>' % name, nout=<NUM_LIT:1>).ravel().tolist()<EOL>methods = session.eval('<STR_LIT>' % name, nout=<NUM_LIT:1>).ravel().tolist()<EOL>ref = weakref.ref(session)<EOL>doc = _DocDescriptor(ref, name)<EOL>values = dict(__doc__=doc, _name=name, _ref=ref, _attrs=attrs,<EOL>__module__='<STR_LIT>')<EOL>for method in methods:<EOL><INDENT>doc = _MethodDocDescriptor(ref, name, method)<EOL>cls_name = '<STR_LIT>' % (name, method)<EOL>method_values = dict(__doc__=doc)<EOL>method_cls = type(str(cls_name),<EOL>(OctaveUserClassMethod,), method_values)<EOL>values[method] = method_cls(ref, method, name)<EOL><DEDENT>for attr in attrs:<EOL><INDENT>values[attr] = OctaveUserClassAttr(ref, attr, attr)<EOL><DEDENT>return type(str(name), (OctaveUserClass,), values)<EOL>
Make an Octave class for a given class name