From: <pj...@us...> - 2008-08-19 23:34:37
|
Revision: 5211 http://jython.svn.sourceforge.net/jython/?rev=5211&view=rev Author: pjenvey Date: 2008-08-19 23:34:29 +0000 (Tue, 19 Aug 2008) Log Message: ----------- small cleanup Modified Paths: -------------- trunk/jython/src/org/python/core/PyBaseException.java trunk/jython/src/org/python/core/PyObject.java trunk/jython/src/org/python/core/__builtin__.java Modified: trunk/jython/src/org/python/core/PyBaseException.java =================================================================== --- trunk/jython/src/org/python/core/PyBaseException.java 2008-08-19 21:43:06 UTC (rev 5210) +++ trunk/jython/src/org/python/core/PyBaseException.java 2008-08-19 23:34:29 UTC (rev 5211) @@ -166,23 +166,20 @@ } } + @Override public String toString() { - return __repr__().toString(); + return BaseException_toString(); } - - public PyString __repr__() { - return BaseException___repr__(); - } - @ExposedMethod - final PyString BaseException___repr__() { + @ExposedMethod(names = ("__repr__")) + final String BaseException_toString() { PyObject reprSuffix = args.__repr__(); String name = getType().fastGetName(); int lastDot = name.lastIndexOf('.'); if (lastDot != -1) { name = name.substring(lastDot + 1); } - return Py.newString(name + reprSuffix.toString()); + return name + reprSuffix.toString(); } @ExposedSet(name = "args") Modified: trunk/jython/src/org/python/core/PyObject.java =================================================================== --- trunk/jython/src/org/python/core/PyObject.java 2008-08-19 21:43:06 UTC (rev 5210) +++ trunk/jython/src/org/python/core/PyObject.java 2008-08-19 23:34:29 UTC (rev 5211) @@ -281,7 +281,7 @@ * * @param arg0 the first argument to the function. * @param arg1 the second argument to the function. -n **/ + **/ public PyObject __call__(PyObject arg0, PyObject arg1) { return __call__(new PyObject[] { arg0, arg1 }, Py.NoKeywords); } Modified: trunk/jython/src/org/python/core/__builtin__.java =================================================================== --- trunk/jython/src/org/python/core/__builtin__.java 2008-08-19 21:43:06 UTC (rev 5210) +++ trunk/jython/src/org/python/core/__builtin__.java 2008-08-19 23:34:29 UTC (rev 5211) @@ -1410,7 +1410,7 @@ @Override public String toString() { - return "<built-in function min>"; + return "<built-in function max>"; } private static PyObject max(PyObject o, PyObject key) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |