SF.net SVN: jython:[7249] trunk/jython/src/org/python/core/PyFloat.java
[email protected] Sat, 19 Mar 2011 23:41:41 +0000
| Newsgroups | gmane.comp.lang.jython.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 7249
http://jython.svn.sourceforge.net/jython/?rev=7249&view=rev
Author: pjenvey
Date: 2011-03-19 23:41:41 +0000 (Sat, 19 Mar 2011)
Log Message:
-----------
simplify
Modified Paths:
--------------
trunk/jython/src/org/python/core/PyFloat.java
Modified: trunk/jython/src/org/python/core/PyFloat.java
===================================================================
--- trunk/jython/src/org/python/core/PyFloat.java 2011-03-19 20:47:21 UTC (rev 7248)
+++ trunk/jython/src/org/python/core/PyFloat.java 2011-03-19 23:41:41 UTC (rev 7249)
@@ -81,7 +81,7 @@
@ExposedGet(name = "real", doc = BuiltinDocs.float_real_doc)
public PyObject getReal() {
- return getType() == TYPE ? this : new PyFloat(value);
+ return float___float__();
}
@ExposedGet(name = "imag", doc = BuiltinDocs.float_imag_doc)
@@ -684,10 +684,7 @@
@ExposedMethod(doc = BuiltinDocs.float___float___doc)
final PyFloat float___float__() {
- if (getType() == TYPE) {
- return this;
- }
- return Py.newFloat(getValue());
+ return getType() == TYPE ? this : Py.newFloat(getValue());
}
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d