From: <pj...@us...> - 2009-10-16 02:39:29
|
Revision: 6861 http://jython.svn.sourceforge.net/jython/?rev=6861&view=rev Author: pjenvey Date: 2009-10-16 02:39:10 +0000 (Fri, 16 Oct 2009) Log Message: ----------- doc sets and BaseException Modified Paths: -------------- trunk/jython/Misc/make_pydocs.py trunk/jython/src/org/python/core/BuiltinDocs.java trunk/jython/src/org/python/core/PyBaseException.java trunk/jython/src/org/python/core/PyFrozenSet.java trunk/jython/src/org/python/core/PySet.java trunk/jython/src/org/python/core/exceptions.java Modified: trunk/jython/Misc/make_pydocs.py =================================================================== --- trunk/jython/Misc/make_pydocs.py 2009-10-15 19:34:31 UTC (rev 6860) +++ trunk/jython/Misc/make_pydocs.py 2009-10-16 02:39:10 UTC (rev 6861) @@ -53,6 +53,9 @@ complex, opt('bool'), classmethod, +set, +frozenset, +BaseException, #buffer, # + type(f), @@ -60,7 +63,6 @@ type(f.func_code), type(sys._getframe()), type(tb), -#type(slice), ] outfile = open("BuiltinDocs.java", "w") @@ -75,5 +77,3 @@ print_doc(outfile, obj, meth) print >> outfile, '}' - - Modified: trunk/jython/src/org/python/core/BuiltinDocs.java =================================================================== --- trunk/jython/src/org/python/core/BuiltinDocs.java 2009-10-15 19:34:31 UTC (rev 6860) +++ trunk/jython/src/org/python/core/BuiltinDocs.java 2009-10-16 02:39:10 UTC (rev 6861) @@ -2658,6 +2658,355 @@ public final static String classmethod___str___doc = "x.__str__() <==> str(x)"; + // Docs for <type 'set'> + public final static String set___and___doc = + "x.__and__(y) <==> x&y"; + + public final static String set___class___doc = + "type(object) -> the object's type\n" + + "type(name, bases, dict) -> a new type"; + + public final static String set___cmp___doc = + "x.__cmp__(y) <==> cmp(x,y)"; + + public final static String set___contains___doc = + "x.__contains__(y) <==> y in x."; + + public final static String set___delattr___doc = + "x.__delattr__('name') <==> del x.name"; + + public final static String set_doc = + "set(iterable) --> set object\n" + + "\n" + + "Build an unordered collection of unique elements."; + + public final static String set___eq___doc = + "x.__eq__(y) <==> x==y"; + + public final static String set___ge___doc = + "x.__ge__(y) <==> x>=y"; + + public final static String set___getattribute___doc = + "x.__getattribute__('name') <==> x.name"; + + public final static String set___gt___doc = + "x.__gt__(y) <==> x>y"; + + public final static String set___hash___doc = + "x.__hash__() <==> hash(x)"; + + public final static String set___iand___doc = + "x.__iand__(y) <==> x&y"; + + public final static String set___init___doc = + "x.__init__(...) initializes x; see x.__class__.__doc__ for signature"; + + public final static String set___ior___doc = + "x.__ior__(y) <==> x|y"; + + public final static String set___isub___doc = + "x.__isub__(y) <==> x-y"; + + public final static String set___iter___doc = + "x.__iter__() <==> iter(x)"; + + public final static String set___ixor___doc = + "x.__ixor__(y) <==> x^y"; + + public final static String set___le___doc = + "x.__le__(y) <==> x<=y"; + + public final static String set___len___doc = + "x.__len__() <==> len(x)"; + + public final static String set___lt___doc = + "x.__lt__(y) <==> x<y"; + + public final static String set___ne___doc = + "x.__ne__(y) <==> x!=y"; + + public final static String set___new___doc = + "T.__new__(S, ...) -> a new object with type S, a subtype of T"; + + public final static String set___or___doc = + "x.__or__(y) <==> x|y"; + + public final static String set___rand___doc = + "x.__rand__(y) <==> y&x"; + + public final static String set___reduce___doc = + "Return state information for pickling."; + + public final static String set___reduce_ex___doc = + "helper for pickle"; + + public final static String set___repr___doc = + "x.__repr__() <==> repr(x)"; + + public final static String set___ror___doc = + "x.__ror__(y) <==> y|x"; + + public final static String set___rsub___doc = + "x.__rsub__(y) <==> y-x"; + + public final static String set___rxor___doc = + "x.__rxor__(y) <==> y^x"; + + public final static String set___setattr___doc = + "x.__setattr__('name', value) <==> x.name = value"; + + public final static String set___str___doc = + "x.__str__() <==> str(x)"; + + public final static String set___sub___doc = + "x.__sub__(y) <==> x-y"; + + public final static String set___xor___doc = + "x.__xor__(y) <==> x^y"; + + public final static String set_add_doc = + "Add an element to a set.\n" + + "\n" + + "This has no effect if the element is already present."; + + public final static String set_clear_doc = + "Remove all elements from this set."; + + public final static String set_copy_doc = + "Return a shallow copy of a set."; + + public final static String set_difference_doc = + "Return the difference of two sets as a new set.\n" + + "\n" + + "(i.e. all elements that are in this set but not the other.)"; + + public final static String set_difference_update_doc = + "Remove all elements of another set from this set."; + + public final static String set_discard_doc = + "Remove an element from a set if it is a member.\n" + + "\n" + + "If the element is not a member, do nothing."; + + public final static String set_intersection_doc = + "Return the intersection of two sets as a new set.\n" + + "\n" + + "(i.e. all elements that are in both sets.)"; + + public final static String set_intersection_update_doc = + "Update a set with the intersection of itself and another."; + + public final static String set_issubset_doc = + "Report whether another set contains this set."; + + public final static String set_issuperset_doc = + "Report whether this set contains another set."; + + public final static String set_pop_doc = + "Remove and return an arbitrary set element."; + + public final static String set_remove_doc = + "Remove an element from a set; it must be a member.\n" + + "\n" + + "If the element is not a member, raise a KeyError."; + + public final static String set_symmetric_difference_doc = + "Return the symmetric difference of two sets as a new set.\n" + + "\n" + + "(i.e. all elements that are in exactly one of the sets.)"; + + public final static String set_symmetric_difference_update_doc = + "Update a set with the symmetric difference of itself and another."; + + public final static String set_union_doc = + "Return the union of two sets as a new set.\n" + + "\n" + + "(i.e. all elements that are in either set.)"; + + public final static String set_update_doc = + "Update a set with the union of itself and another."; + + // Docs for <type 'frozenset'> + public final static String frozenset___and___doc = + "x.__and__(y) <==> x&y"; + + public final static String frozenset___class___doc = + "type(object) -> the object's type\n" + + "type(name, bases, dict) -> a new type"; + + public final static String frozenset___cmp___doc = + "x.__cmp__(y) <==> cmp(x,y)"; + + public final static String frozenset___contains___doc = + "x.__contains__(y) <==> y in x."; + + public final static String frozenset___delattr___doc = + "x.__delattr__('name') <==> del x.name"; + + public final static String frozenset_doc = + "frozenset(iterable) --> frozenset object\n" + + "\n" + + "Build an immutable unordered collection of unique elements."; + + public final static String frozenset___eq___doc = + "x.__eq__(y) <==> x==y"; + + public final static String frozenset___ge___doc = + "x.__ge__(y) <==> x>=y"; + + public final static String frozenset___getattribute___doc = + "x.__getattribute__('name') <==> x.name"; + + public final static String frozenset___gt___doc = + "x.__gt__(y) <==> x>y"; + + public final static String frozenset___hash___doc = + "x.__hash__() <==> hash(x)"; + + public final static String frozenset___init___doc = + "x.__init__(...) initializes x; see x.__class__.__doc__ for signature"; + + public final static String frozenset___iter___doc = + "x.__iter__() <==> iter(x)"; + + public final static String frozenset___le___doc = + "x.__le__(y) <==> x<=y"; + + public final static String frozenset___len___doc = + "x.__len__() <==> len(x)"; + + public final static String frozenset___lt___doc = + "x.__lt__(y) <==> x<y"; + + public final static String frozenset___ne___doc = + "x.__ne__(y) <==> x!=y"; + + public final static String frozenset___new___doc = + "T.__new__(S, ...) -> a new object with type S, a subtype of T"; + + public final static String frozenset___or___doc = + "x.__or__(y) <==> x|y"; + + public final static String frozenset___rand___doc = + "x.__rand__(y) <==> y&x"; + + public final static String frozenset___reduce___doc = + "Return state information for pickling."; + + public final static String frozenset___reduce_ex___doc = + "helper for pickle"; + + public final static String frozenset___repr___doc = + "x.__repr__() <==> repr(x)"; + + public final static String frozenset___ror___doc = + "x.__ror__(y) <==> y|x"; + + public final static String frozenset___rsub___doc = + "x.__rsub__(y) <==> y-x"; + + public final static String frozenset___rxor___doc = + "x.__rxor__(y) <==> y^x"; + + public final static String frozenset___setattr___doc = + "x.__setattr__('name', value) <==> x.name = value"; + + public final static String frozenset___str___doc = + "x.__str__() <==> str(x)"; + + public final static String frozenset___sub___doc = + "x.__sub__(y) <==> x-y"; + + public final static String frozenset___xor___doc = + "x.__xor__(y) <==> x^y"; + + public final static String frozenset_copy_doc = + "Return a shallow copy of a set."; + + public final static String frozenset_difference_doc = + "Return the difference of two sets as a new set.\n" + + "\n" + + "(i.e. all elements that are in this set but not the other.)"; + + public final static String frozenset_intersection_doc = + "Return the intersection of two sets as a new set.\n" + + "\n" + + "(i.e. all elements that are in both sets.)"; + + public final static String frozenset_issubset_doc = + "Report whether another set contains this set."; + + public final static String frozenset_issuperset_doc = + "Report whether this set contains another set."; + + public final static String frozenset_symmetric_difference_doc = + "Return the symmetric difference of two sets as a new set.\n" + + "\n" + + "(i.e. all elements that are in exactly one of the sets.)"; + + public final static String frozenset_union_doc = + "Return the union of two sets as a new set.\n" + + "\n" + + "(i.e. all elements that are in either set.)"; + + // Docs for <type 'exceptions.BaseException'> + public final static String BaseException___class___doc = + "type(object) -> the object's type\n" + + "type(name, bases, dict) -> a new type"; + + public final static String BaseException___delattr___doc = + "x.__delattr__('name') <==> del x.name"; + + public final static String BaseException___dict___doc = + ""; + + public final static String BaseException_doc = + "Common base class for all exceptions"; + + public final static String BaseException___getattribute___doc = + "x.__getattribute__('name') <==> x.name"; + + public final static String BaseException___getitem___doc = + "x.__getitem__(y) <==> x[y]"; + + public final static String BaseException___getslice___doc = + "x.__getslice__(i, j) <==> x[i:j]\n" + + " \n" + + " Use of negative indices is not supported."; + + public final static String BaseException___hash___doc = + "x.__hash__() <==> hash(x)"; + + public final static String BaseException___init___doc = + "x.__init__(...) initializes x; see x.__class__.__doc__ for signature"; + + public final static String BaseException___new___doc = + "T.__new__(S, ...) -> a new object with type S, a subtype of T"; + + public final static String BaseException___reduce___doc = + ""; + + public final static String BaseException___reduce_ex___doc = + "helper for pickle"; + + public final static String BaseException___repr___doc = + "x.__repr__() <==> repr(x)"; + + public final static String BaseException___setattr___doc = + "x.__setattr__('name', value) <==> x.name = value"; + + public final static String BaseException___setstate___doc = + ""; + + public final static String BaseException___str___doc = + "x.__str__() <==> str(x)"; + + public final static String BaseException_args_doc = + ""; + + public final static String BaseException_message_doc = + "exception message"; + // Docs for <type 'function'> public final static String function___call___doc = "x.__call__(...) <==> x(...)"; Modified: trunk/jython/src/org/python/core/PyBaseException.java =================================================================== --- trunk/jython/src/org/python/core/PyBaseException.java 2009-10-15 19:34:31 UTC (rev 6860) +++ trunk/jython/src/org/python/core/PyBaseException.java 2009-10-16 02:39:10 UTC (rev 6861) @@ -12,18 +12,18 @@ * The base class for all standard Python exceptions. * */ -@ExposedType(name = "exceptions.BaseException") +@ExposedType(name = "exceptions.BaseException", doc = BuiltinDocs.BaseException_doc) public class PyBaseException extends PyObject { public static final PyType TYPE = PyType.fromClass(PyBaseException.class); /** Exception message. */ - @ExposedGet + @ExposedGet(doc = BuiltinDocs.BaseException_message_doc) @ExposedSet public PyObject message = Py.EmptyString; /** Exception's arguments. */ - @ExposedGet + @ExposedGet(doc = BuiltinDocs.BaseException_args_doc) public PyObject args = Py.EmptyTuple; /** Exception's underlying dictionary, lazily created. */ @@ -42,7 +42,7 @@ } @ExposedNew - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.BaseException___init___doc) final void BaseException___init__(PyObject[] args, String[] keywords) { ArgParser ap = new ArgParser(getType().getName(), args, keywords, "args"); ap.noKeywords(); @@ -56,7 +56,7 @@ return BaseException___getitem__(index); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.BaseException___getitem___doc) final PyObject BaseException___getitem__(PyObject index) { return args.__getitem__(index); } @@ -65,7 +65,7 @@ return BaseException___getslice__(start, stop); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.BaseException___getslice___doc) final PyObject BaseException___getslice__(PyObject start, PyObject stop) { return args.__getslice__(start, stop); } @@ -75,7 +75,7 @@ return BaseException___reduce__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.BaseException___reduce___doc) final PyObject BaseException___reduce__() { if (__dict__ != null) { return new PyTuple(getType(), args, __dict__); @@ -88,7 +88,7 @@ return BaseException___setstate__(state); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.BaseException___setstate___doc) final PyObject BaseException___setstate__(PyObject state) { if (state != Py.None) { if (!(state instanceof PyStringMap) && !(state instanceof PyDictionary)) { @@ -120,7 +120,7 @@ BaseException___setattr__(name, value); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.BaseException___setattr___doc) final void BaseException___setattr__(String name, PyObject value) { ensureDict(); super.__setattr__(name, value); @@ -130,7 +130,7 @@ return __dict__; } - @ExposedGet(name = "__dict__") + @ExposedGet(name = "__dict__", doc = BuiltinDocs.BaseException___dict___doc) public PyObject getDict() { ensureDict(); return __dict__; @@ -154,7 +154,7 @@ return BaseException___str__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.BaseException___str___doc) final PyString BaseException___str__() { switch (args.__len__()) { case 0: @@ -171,7 +171,7 @@ return BaseException_toString(); } - @ExposedMethod(names = ("__repr__")) + @ExposedMethod(names = "__repr__", doc = BuiltinDocs.BaseException___repr___doc) final String BaseException_toString() { PyObject reprSuffix = args.__repr__(); String name = getType().fastGetName(); Modified: trunk/jython/src/org/python/core/PyFrozenSet.java =================================================================== --- trunk/jython/src/org/python/core/PyFrozenSet.java 2009-10-15 19:34:31 UTC (rev 6860) +++ trunk/jython/src/org/python/core/PyFrozenSet.java 2009-10-16 02:39:10 UTC (rev 6861) @@ -9,7 +9,7 @@ import org.python.expose.ExposedType; import org.python.expose.MethodType; -@ExposedType(name = "frozenset", base = PyObject.class) +@ExposedType(name = "frozenset", base = PyObject.class, doc = BuiltinDocs.frozenset_doc) public class PyFrozenSet extends BaseSet { public static final PyType TYPE = PyType.fromClass(PyFrozenSet.class); @@ -51,72 +51,72 @@ return fset; } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___cmp___doc) final PyObject frozenset___cmp__(PyObject o) { return new PyInteger(baseset___cmp__(o)); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___ne___doc) final PyObject frozenset___ne__(PyObject o) { return baseset___ne__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___eq___doc) final PyObject frozenset___eq__(PyObject o) { return baseset___eq__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___or___doc) final PyObject frozenset___or__(PyObject o) { return baseset___or__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___xor___doc) final PyObject frozenset___xor__(PyObject o) { return baseset___xor__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___sub___doc) final PyObject frozenset___sub__(PyObject o) { return baseset___sub__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___and___doc) final PyObject frozenset___and__(PyObject o) { return baseset___and__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___lt___doc) final PyObject frozenset___lt__(PyObject o) { return baseset___lt__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___gt___doc) final PyObject frozenset___gt__(PyObject o) { return baseset___gt__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___ge___doc) final PyObject frozenset___ge__(PyObject o) { return baseset___ge__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.frozenset___le___doc) final PyObject frozenset___le__(PyObject o) { return baseset___le__(o); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset___iter___doc) final PyObject frozenset___iter__() { return baseset___iter__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset___contains___doc) final boolean frozenset___contains__(PyObject item) { return baseset___contains__(item); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset_copy_doc) final PyObject frozenset_copy() { if (getClass() == PyFrozenSet.class) { return this; @@ -125,52 +125,52 @@ return baseset_copy(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset_union_doc) final PyObject frozenset_union(PyObject set) { return baseset_union(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset_difference_doc) final PyObject frozenset_difference(PyObject set) { return baseset_difference(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset_symmetric_difference_doc) final PyObject frozenset_symmetric_difference(PyObject set) { return baseset_symmetric_difference(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset_intersection_doc) final PyObject frozenset_intersection(PyObject set) { return baseset_intersection(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset_issubset_doc) final PyObject frozenset_issubset(PyObject set) { return baseset_issubset(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset_issuperset_doc) final PyObject frozenset_issuperset(PyObject set) { return baseset_issuperset(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset___len___doc) final int frozenset___len__() { return baseset___len__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset___reduce___doc) final PyObject frozenset___reduce__() { return baseset___reduce__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.frozenset___hash___doc) final int frozenset___hash__() { return _set.hashCode(); } - @ExposedMethod(names = "__repr__") + @ExposedMethod(names = "__repr__", doc = BuiltinDocs.frozenset___repr___doc) final String frozenset_toString() { return baseset_toString(); } Modified: trunk/jython/src/org/python/core/PySet.java =================================================================== --- trunk/jython/src/org/python/core/PySet.java 2009-10-15 19:34:31 UTC (rev 6860) +++ trunk/jython/src/org/python/core/PySet.java 2009-10-16 02:39:10 UTC (rev 6861) @@ -10,7 +10,7 @@ import org.python.expose.MethodType; import org.python.util.Generic; -@ExposedType(name = "set", base = PyObject.class) +@ExposedType(name = "set", base = PyObject.class, doc = BuiltinDocs.set_doc) public class PySet extends BaseSet { public static final PyType TYPE = PyType.fromClass(PySet.class); @@ -33,7 +33,7 @@ } @ExposedNew - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set___init___doc) final void set___init__(PyObject[] args, String[] kwds) { int nargs = args.length - kwds.length; if (nargs > 1) { @@ -47,112 +47,112 @@ _update(args[0]); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___cmp___doc) final PyObject set___cmp__(PyObject o) { return new PyInteger(baseset___cmp__(o)); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___ne___doc) final PyObject set___ne__(PyObject o) { return baseset___ne__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___eq___doc) final PyObject set___eq__(PyObject o) { return baseset___eq__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___or___doc) final PyObject set___or__(PyObject o) { return baseset___or__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___xor___doc) final PyObject set___xor__(PyObject o) { return baseset___xor__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___sub___doc) final PyObject set___sub__(PyObject o) { return baseset___sub__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___and___doc) final PyObject set___and__(PyObject o) { return baseset___and__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___lt___doc) final PyObject set___lt__(PyObject o) { return baseset___lt__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___gt___doc) final PyObject set___gt__(PyObject o) { return baseset___gt__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___ge___doc) final PyObject set___ge__(PyObject o) { return baseset___ge__(o); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___le___doc) final PyObject set___le__(PyObject o) { return baseset___le__(o); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set___iter___doc) final PyObject set___iter__() { return baseset___iter__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set___contains___doc) final boolean set___contains__(PyObject item) { return baseset___contains__(item); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_copy_doc) final PyObject set_copy() { return baseset_copy(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_union_doc) final PyObject set_union(PyObject set) { return baseset_union(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_difference_doc) final PyObject set_difference(PyObject set) { return baseset_difference(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_symmetric_difference_doc) final PyObject set_symmetric_difference(PyObject set) { return baseset_symmetric_difference(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_intersection_doc) final PyObject set_intersection(PyObject set) { return baseset_intersection(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_issubset_doc) final PyObject set_issubset(PyObject set) { return baseset_issubset(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_issuperset_doc) final PyObject set_issuperset(PyObject set) { return baseset_issuperset(set); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set___len___doc) final int set___len__() { return baseset___len__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set___reduce___doc) final PyObject set___reduce__() { return baseset___reduce__(); } @@ -161,7 +161,7 @@ return set___ior__(other); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___ior___doc) final PyObject set___ior__(PyObject other) { if (!(other instanceof BaseSet)) { return null; @@ -174,7 +174,7 @@ return set___ixor__(other); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___ixor___doc) final PyObject set___ixor__(PyObject other) { if (!(other instanceof BaseSet)) { return null; @@ -187,7 +187,7 @@ return set___iand__(other); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___iand___doc) final PyObject set___iand__(PyObject other) { if (!(other instanceof BaseSet)) { return null; @@ -200,7 +200,7 @@ return set___isub__(other); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.set___isub___doc) final PyObject set___isub__(PyObject other) { if (!(other instanceof BaseSet)) { return null; @@ -213,17 +213,17 @@ return set___hash__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set___hash___doc) final int set___hash__() { throw Py.TypeError("set objects are unhashable"); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_add_doc) final void set_add(PyObject o) { _set.add(o); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_remove_doc) final void set_remove(PyObject o) { boolean b = false; try { @@ -237,7 +237,7 @@ } } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_discard_doc) final void set_discard(PyObject o) { try { _set.remove(o); @@ -247,7 +247,7 @@ } } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_pop_doc) final PyObject set_pop() { Iterator iterator = _set.iterator(); try { @@ -259,17 +259,17 @@ } } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_clear_doc) final void set_clear() { _set.clear(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_update_doc) final void set_update(PyObject data) { _update(data); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_intersection_update_doc) final void set_intersection_update(PyObject other) { if (other instanceof BaseSet) { __iand__(other); @@ -279,7 +279,7 @@ } } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_symmetric_difference_update_doc) final void set_symmetric_difference_update(PyObject other) { if (this == other) { set_clear(); @@ -296,7 +296,7 @@ } } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.set_difference_update_doc) final void set_difference_update(PyObject other) { if (other instanceof BaseSet) { __isub__(other); @@ -309,7 +309,7 @@ } } - @ExposedMethod(names = "__repr__") + @ExposedMethod(names = "__repr__", doc = BuiltinDocs.set___repr___doc) final String set_toString() { return baseset_toString(); } Modified: trunk/jython/src/org/python/core/exceptions.java =================================================================== --- trunk/jython/src/org/python/core/exceptions.java 2009-10-15 19:34:31 UTC (rev 6860) +++ trunk/jython/src/org/python/core/exceptions.java 2009-10-16 02:39:10 UTC (rev 6861) @@ -41,9 +41,6 @@ } ts.frame = frame; - // XXX: - PyObject baseExcDict = PyBaseException.TYPE.fastGetDict(); - baseExcDict.__setitem__("__doc__", Py.newString("Common base class for all exceptions")); dict.__setitem__("BaseException", PyBaseException.TYPE); buildClass(dict, "KeyboardInterrupt", "BaseException", "Program interrupted by user."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |