From: <fwi...@us...> - 2009-01-03 04:19:54
|
Revision: 5835 http://jython.svn.sourceforge.net/jython/?rev=5835&view=rev Author: fwierzbicki Date: 2009-01-03 04:19:44 +0000 (Sat, 03 Jan 2009) Log Message: ----------- __doc__ for classmethod, instancemethod, bool, function. Modified Paths: -------------- trunk/jython/src/org/python/core/PyBoolean.java trunk/jython/src/org/python/core/PyClassMethod.java trunk/jython/src/org/python/core/PyFunction.java trunk/jython/src/org/python/core/PyMethod.java Modified: trunk/jython/src/org/python/core/PyBoolean.java =================================================================== --- trunk/jython/src/org/python/core/PyBoolean.java 2009-01-03 02:47:53 UTC (rev 5834) +++ trunk/jython/src/org/python/core/PyBoolean.java 2009-01-03 04:19:44 UTC (rev 5835) @@ -50,7 +50,7 @@ return bool_toString(); } - @ExposedMethod(names = {"__str__", "__repr__"}) + @ExposedMethod(names = {"__str__", "__repr__"}, doc = BuiltinDocs.bool___str___doc) final String bool_toString() { return value ? "True" : "False"; } @@ -59,7 +59,7 @@ return bool___hash__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.bool___hash___doc) final int bool___hash__() { return value ? 1 : 0; } @@ -68,7 +68,7 @@ return bool___nonzero__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.bool___nonzero___doc) final boolean bool___nonzero__() { return value; } @@ -99,7 +99,7 @@ return bool___and__(right); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bool___and___doc) final PyObject bool___and__(PyObject right) { if (right instanceof PyBoolean) { return Py.newBoolean(value & ((PyBoolean)right).value); @@ -114,7 +114,7 @@ return bool___xor__(right); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bool___xor___doc) final PyObject bool___xor__(PyObject right) { if (right instanceof PyBoolean) { return Py.newBoolean(value ^ ((PyBoolean)right).value); @@ -129,7 +129,7 @@ return bool___or__(right); } - @ExposedMethod(type = MethodType.BINARY) + @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bool___or___doc) final PyObject bool___or__(PyObject right) { if (right instanceof PyBoolean) { return Py.newBoolean(value | ((PyBoolean)right).value); @@ -144,7 +144,7 @@ return bool___neg__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.bool___neg___doc) final PyObject bool___neg__() { return Py.newInteger(value ? -1 : 0); } @@ -153,7 +153,7 @@ return bool___pos__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.bool___pos___doc) final PyObject bool___pos__() { return Py.newInteger(value ? 1 : 0); } @@ -162,7 +162,7 @@ return bool___abs__(); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.bool___abs___doc) final PyObject bool___abs__() { return Py.newInteger(value ? 1 : 0); } Modified: trunk/jython/src/org/python/core/PyClassMethod.java =================================================================== --- trunk/jython/src/org/python/core/PyClassMethod.java 2009-01-03 02:47:53 UTC (rev 5834) +++ trunk/jython/src/org/python/core/PyClassMethod.java 2009-01-03 04:19:44 UTC (rev 5835) @@ -41,7 +41,7 @@ return classmethod___get__(obj, type); } - @ExposedMethod(defaults = "null") + @ExposedMethod(defaults = "null", doc = BuiltinDocs.classmethod___get___doc) final PyObject classmethod___get__(PyObject obj, PyObject type) { if(type == null) { type = obj.getType(); Modified: trunk/jython/src/org/python/core/PyFunction.java =================================================================== --- trunk/jython/src/org/python/core/PyFunction.java 2009-01-03 02:47:53 UTC (rev 5834) +++ trunk/jython/src/org/python/core/PyFunction.java 2009-01-03 04:19:44 UTC (rev 5835) @@ -276,7 +276,7 @@ function___setattr__(name, value); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.function___setattr___doc) final void function___setattr__(String name, PyObject value) { ensureDict(); super.__setattr__(name, value); @@ -292,7 +292,7 @@ return function___get__(obj, type); } - @ExposedMethod(defaults = "null") + @ExposedMethod(defaults = "null", doc = BuiltinDocs.function___get___doc) final PyObject function___get__(PyObject obj, PyObject type) { return new PyMethod(this, obj, type); } @@ -323,7 +323,7 @@ return function___call__(args, keywords); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.function___call___doc) final PyObject function___call__(PyObject[] args, String[] keywords) { return func_code.call(args, keywords, func_globals, func_defaults, func_closure); } Modified: trunk/jython/src/org/python/core/PyMethod.java =================================================================== --- trunk/jython/src/org/python/core/PyMethod.java 2009-01-03 02:47:53 UTC (rev 5834) +++ trunk/jython/src/org/python/core/PyMethod.java 2009-01-03 04:19:44 UTC (rev 5835) @@ -67,7 +67,7 @@ return im_func.__findattr_ex__(name); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.instancemethod___getattribute___doc) final PyObject instancemethod___getattribute__(PyObject arg0) { String name = asName(arg0); PyObject ret = instancemethod___findattr_ex__(name); @@ -82,7 +82,7 @@ return instancemethod___get__(obj, type); } - @ExposedMethod(defaults = "null") + @ExposedMethod(defaults = "null", doc = BuiltinDocs.instancemethod___get___doc) final PyObject instancemethod___get__(PyObject obj, PyObject type) { // Only if classes are compatible if (obj == null || im_self != null) { @@ -99,7 +99,7 @@ return instancemethod___call__(args, keywords); } - @ExposedMethod + @ExposedMethod(doc = BuiltinDocs.instancemethod___call___doc) final PyObject instancemethod___call__(PyObject[] args, String[] keywords) { PyObject self = im_self; @@ -136,7 +136,7 @@ return instancemethod___cmp__(other); } - @ExposedMethod(type = MethodType.CMP) + @ExposedMethod(type = MethodType.CMP, doc = BuiltinDocs.instancemethod___cmp___doc) final int instancemethod___cmp__(PyObject other) { if (!(other instanceof PyMethod)) { return -2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |