diff -r 2cb7e7b8f4a8 .project
--- a/.project Sat Sep 13 18:50:40 2008 -0400
+++ b/.project Sun Sep 21 13:05:09 2008 -0400
@@ -5,6 +5,11 @@
+
+ org.python.pydev.PyDevBuilder
+
+
+
org.eclipse.jdt.core.javabuilder
@@ -23,5 +28,6 @@
org.eclipse.jdt.core.javanature
+ org.python.pydev.pythonNature
diff -r 2cb7e7b8f4a8 Lib/javapath.py
--- a/Lib/javapath.py Sat Sep 13 18:50:40 2008 -0400
+++ b/Lib/javapath.py Sun Sep 21 13:05:09 2008 -0400
@@ -20,6 +20,8 @@
from java.lang import System
import os
+from org.python.core.util.StringUtil import asPyString
+
def _tostr(s, method):
if isinstance(s, basestring):
@@ -36,11 +38,11 @@
type_name = '%s.' % obj_type.__module__
type_name += obj_type.__name__
return type_name
-
+
def dirname(path):
"""Return the directory component of a pathname"""
path = _tostr(path, "dirname")
- result = File(path).getParent()
+ result = asPyString(File(path).getParent())
if not result:
if isabs(path):
result = path # Must be root
@@ -51,7 +53,7 @@
def basename(path):
"""Return the final component of a pathname"""
path = _tostr(path, "basename")
- return File(path).getName()
+ return asPyString(File(path).getName())
def split(path):
"""Split a pathname.
@@ -81,7 +83,7 @@
return (path[:n], path[n:])
def splitdrive(path):
- """Split a pathname into drive and path specifiers.
+ """Split a pathname into drive and path specifiers.
Returns a 2-tuple "(drive,path)"; either part may be empty.
"""
@@ -128,7 +130,7 @@
if a == "":
a = os.sep
f = File(f, a)
- return f.getPath()
+ return asPyString(f.getPath())
def normcase(path):
"""Normalize case of pathname.
@@ -137,7 +139,7 @@
"""
path = _tostr(path, "normcase")
- return File(path).getPath()
+ return asPyString(File(path).getPath())
def commonprefix(m):
"Given a list of pathnames, return the longest common leading component"
@@ -197,7 +199,7 @@
if not c:
return gethome()
if c == os.sep:
- return File(gethome(), path[2:]).getPath()
+ return asPyString(File(gethome(), path[2:]).getPath())
return path
def getuser():
@@ -252,16 +254,16 @@
def _abspath(path):
# Must use normpath separately because getAbsolutePath doesn't normalize
# and getCanonicalPath would eliminate symlinks.
- return normpath(File(sys.getPath(path)).getAbsolutePath())
+ return normpath(asPyString(File(sys.getPath(path)).getAbsolutePath()))
def realpath(path):
"""Return an absolute path normalized and symbolic links eliminated"""
path = _tostr(path, "realpath")
return _realpath(path)
-
+
def _realpath(path):
try:
- return File(sys.getPath(path)).getCanonicalPath()
+ return asPyString(File(sys.getPath(path)).getCanonicalPath())
except java.io.IOException:
return _abspath(path)
diff -r 2cb7e7b8f4a8 Lib/os.py
--- a/Lib/os.py Sat Sep 13 18:50:40 2008 -0400
+++ b/Lib/os.py Sun Sep 21 13:05:09 2008 -0400
@@ -48,6 +48,7 @@
from java.io import File
from org.python.core import PyFile
from org.python.core.io import FileDescriptors, FileIO, IOBase
+from org.python.core.util.StringUtil import asPyString
# Mapping of: os._name: [name list, shell command list]
_os_map = dict(nt=[
@@ -205,15 +206,15 @@
if i < 0 or i > 9:
raise IndexError(i)
return getattr(self, stat_result._stat_members[i][0])
-
+
def __setitem__(self, x, value):
raise TypeError("object doesn't support item assignment")
-
+
def __setattr__(self, name, value):
if name in [x[0] for x in stat_result._stat_members]:
raise TypeError(name)
raise AttributeError("readonly attribute")
-
+
def __len__(self):
return 10
@@ -264,7 +265,7 @@
l = File(sys.getPath(path)).list()
if l is None:
raise OSError(0, 'No such directory', path)
- return list(l)
+ return [asPyString(entry) for entry in l]
def chmod(path, mode):
"""chmod(path, mode)
@@ -303,14 +304,14 @@
# if making a /x/y/z/., java.io.File#mkdirs inexplicably fails. So we need
# to force it
-
+
# need to use _path instead of path, because param is hiding
# os.path module in namespace!
head, tail = _path.split(sys_path)
if tail == curdir:
if File(_path.join(head)).mkdirs():
return
-
+
raise OSError(0, "couldn't make directories", path)
def remove(path):
@@ -392,7 +393,7 @@
def strerror(code):
"""strerror(code) -> string
-
+
Translate an error code to a message string.
"""
if not isinstance(code, (int, long)):
@@ -404,7 +405,7 @@
def access(path, mode):
"""access(path, mode) -> True if granted, False otherwise
-
+
Use the real uid/gid to test for access to a path. Note that most
operations will use the effective uid/gid, therefore this routine can
be used in a suid/sgid environment to test if the invoking user has the
@@ -458,7 +459,7 @@
def lstat(path):
"""lstat(path) -> stat result
-
+
Like stat(path), but do not follow symbolic links.
"""
abs_path = sys.getPath(path)
@@ -545,7 +546,7 @@
"""ftruncate(fd, length)
Truncate a file to a specified length.
- """
+ """
rawio = FileDescriptors.get(fd)
try:
rawio.truncate(length)
@@ -624,7 +625,7 @@
from org.python.core.util import StringUtil
rawio = FileDescriptors.get(fd)
buf = _handle_oserror(rawio.read, buffersize)
- return str(StringUtil.fromBytes(buf))
+ return asPyString(StringUtil.fromBytes(buf))
def write(fd, string):
"""write(fd, string) -> byteswritten
@@ -647,7 +648,7 @@
if _name == 'posix' and _native_posix:
def link(src, dst):
"""link(src, dst)
-
+
Create a hard link to a file.
"""
_posix.link(sys.getPath(src), sys.getPath(dst))
@@ -661,7 +662,7 @@
def readlink(path):
"""readlink(path) -> path
-
+
Return a string representing the path to which the symbolic link
points.
"""
@@ -863,7 +864,7 @@
def putenv(key, value):
"""putenv(key, value)
-
+
Change or add an environment variable.
"""
environ[key] = value
diff -r 2cb7e7b8f4a8 Lib/zlib.py
--- a/Lib/zlib.py Sat Sep 13 18:50:40 2008 -0400
+++ b/Lib/zlib.py Sun Sep 21 13:05:09 2008 -0400
@@ -1,7 +1,9 @@
import jarray, binascii
from java.util.zip import Adler32, Deflater, Inflater
-from java.lang import Long, String, StringBuffer
+from java.lang import Long, String
+
+from cStringIO import StringIO
class error(Exception):
pass
@@ -28,7 +30,7 @@
_valid_flush_modes = (Z_FINISH,)
def adler32(s, value=1):
- if value != 1:
+ if value != 1:
raise ValueError, "adler32 only support start value of 1"
checksum = Adler32()
checksum.update(String.getBytes(s, 'iso-8859-1'))
@@ -50,7 +52,7 @@
inflater = Inflater(wbits < 0)
inflater.setInput(string)
return _get_inflate_data(inflater)
-
+
class compressobj:
# all jython uses wbits for is deciding whether to skip the header if it's negative
@@ -69,7 +71,7 @@
raise error("compressobj may not be used after flush(Z_FINISH)")
self.deflater.setInput(string, 0, len(string))
return _get_deflate_data(self.deflater)
-
+
def flush(self, mode=Z_FINISH):
if self._ended:
raise error("compressobj may not be used after flush(Z_FINISH)")
@@ -94,7 +96,7 @@
def decompress(self, string, max_length=0):
if self._ended:
raise error("decompressobj may not be used after flush()")
-
+
# unused_data is always "" until inflation is finished; then it is
# the unused bytes of the input;
# unconsumed_tail is whatever input was not used because max_length
@@ -115,7 +117,7 @@
self.unconsumed_tail = string[-r:]
else:
self.unused_data = string[-r:]
-
+
return inflated
def flush(self, length=None):
@@ -132,18 +134,19 @@
def _get_deflate_data(deflater):
buf = jarray.zeros(1024, 'b')
- sb = StringBuffer()
+ s = StringIO()
while not deflater.finished():
l = deflater.deflate(buf)
if l == 0:
break
- sb.append(String(buf, 0, 0, l))
- return sb.toString()
+ s.write(String(buf, 0, 0, l))
+ s.seek(0)
+ return s.read()
-
+
def _get_inflate_data(inflater, max_length=0):
buf = jarray.zeros(1024, 'b')
- sb = StringBuffer()
+ s = StringIO()
total = 0
while not inflater.finished():
if max_length:
@@ -154,7 +157,8 @@
break
total += l
- sb.append(String(buf, 0, 0, l))
+ s.write(String(buf, 0, 0, l))
if max_length and total == max_length:
break
- return sb.toString()
+ s.seek(0)
+ return s.read()
diff -r 2cb7e7b8f4a8 src/com/ziclix/python/sql/DataHandler.java
--- a/src/com/ziclix/python/sql/DataHandler.java Sat Sep 13 18:50:40 2008 -0400
+++ b/src/com/ziclix/python/sql/DataHandler.java Sun Sep 21 13:05:09 2008 -0400
@@ -177,7 +177,7 @@
case Types.LONGVARCHAR:
if (object instanceof PyFile) {
- object = new PyString(((PyFile) object).read());
+ object = ((PyFile) object).read();
}
String varchar = (String) object.__tojava__(String.class);
@@ -192,7 +192,7 @@
default :
if (object instanceof PyFile) {
- object = new PyString(((PyFile) object).read());
+ object = ((PyFile) object).read();
}
stmt.setObject(index, object.__tojava__(Object.class), type);
diff -r 2cb7e7b8f4a8 src/com/ziclix/python/sql/JDBC20DataHandler.java
--- a/src/com/ziclix/python/sql/JDBC20DataHandler.java Sat Sep 13 18:50:40 2008 -0400
+++ b/src/com/ziclix/python/sql/JDBC20DataHandler.java Sun Sep 21 13:05:09 2008 -0400
@@ -62,7 +62,7 @@
case Types.CLOB:
if (object instanceof PyFile) {
- object = new PyString(((PyFile) object).read());
+ object = ((PyFile) object).read();
}
String clob = (String) object.__tojava__(String.class);
diff -r 2cb7e7b8f4a8 src/com/ziclix/python/sql/Jython22DataHandler.java
--- a/src/com/ziclix/python/sql/Jython22DataHandler.java Sat Sep 13 18:50:40 2008 -0400
+++ b/src/com/ziclix/python/sql/Jython22DataHandler.java Sun Sep 21 13:05:09 2008 -0400
@@ -163,7 +163,7 @@
case Types.LONGVARCHAR:
if (object instanceof PyFile) {
- object = new PyString(((PyFile) object).read());
+ object = ((PyFile) object).read();
}
String varchar = (String) object.__tojava__(String.class);
@@ -178,7 +178,7 @@
default :
if (object instanceof PyFile) {
- object = new PyString(((PyFile) object).read());
+ object = ((PyFile) object).read();
}
stmt.setObject(index, object.__tojava__(Object.class), type);
diff -r 2cb7e7b8f4a8 src/com/ziclix/python/sql/handler/MySQLDataHandler.java
--- a/src/com/ziclix/python/sql/handler/MySQLDataHandler.java Sat Sep 13 18:50:40 2008 -0400
+++ b/src/com/ziclix/python/sql/handler/MySQLDataHandler.java Sun Sep 21 13:05:09 2008 -0400
@@ -54,22 +54,24 @@
switch (type) {
case Types.LONGVARCHAR:
- String varchar;
- if (object instanceof PyFile) {
- varchar = ((PyFile) object).read();
- } else {
- varchar = (String) object.__tojava__(String.class);
- }
- InputStream stream = new ByteArrayInputStream(StringUtil.toBytes(varchar));
+ // XXX: Only works with ASCII data!
+ byte[] bytes;
+ if (object instanceof PyFile) {
+ bytes = ((PyFile) object).read().toBytes();
+ } else {
+ String varchar = (String) object.__tojava__(String.class);
+ bytes = StringUtil.toBytes(varchar);
+ }
+ InputStream stream = new ByteArrayInputStream(bytes);
- stream = new BufferedInputStream(stream);
+ stream = new BufferedInputStream(stream);
- stmt.setAsciiStream(index, stream, varchar.length());
- break;
+ stmt.setAsciiStream(index, stream, bytes.length);
+ break;
default :
- super.setJDBCObject(stmt, index, object, type);
- break;
+ super.setJDBCObject(stmt, index, object, type);
+ break;
}
}
}
diff -r 2cb7e7b8f4a8 src/com/ziclix/python/sql/handler/PostgresqlDataHandler.java
--- a/src/com/ziclix/python/sql/handler/PostgresqlDataHandler.java Sat Sep 13 18:50:40 2008 -0400
+++ b/src/com/ziclix/python/sql/handler/PostgresqlDataHandler.java Sun Sep 21 13:05:09 2008 -0400
@@ -111,11 +111,11 @@
String varchar;
// Postgresql driver can't handle the setCharacterStream() method so use setObject() instead
if (object instanceof PyFile) {
- varchar = ((PyFile) object).read();
+ varchar = ((PyFile) object).read().asString();
} else {
varchar = (String) object.__tojava__(String.class);
}
-
+
stmt.setObject(index, varchar, type);
break;
diff -r 2cb7e7b8f4a8 src/org/python/core/PyFile.java
--- a/src/org/python/core/PyFile.java Sat Sep 13 18:50:40 2008 -0400
+++ b/src/org/python/core/PyFile.java Sun Sep 21 13:05:09 2008 -0400
@@ -35,7 +35,7 @@
public class PyFile extends PyObject {
public static final PyType TYPE = PyType.fromClass(PyFile.class);
-
+
/** The filename */
@ExposedGet
public PyObject name;
@@ -286,16 +286,16 @@
}
@ExposedMethod(defaults = {"-1"})
- final synchronized String file_read(int n) {
+ final synchronized PyString file_read(int n) {
checkClosed();
- return file.read(n);
+ return new PyString(file.read(n));
}
- public String read(int n) {
+ public PyString read(int n) {
return file_read(n);
}
- public String read() {
+ public PyString read() {
return file_read(-1);
}
@@ -310,16 +310,16 @@
}
@ExposedMethod(defaults = {"-1"})
- final synchronized String file_readline(int max) {
+ final synchronized PyString file_readline(int max) {
checkClosed();
- return file.readline(max);
+ return new PyString(file.readline(max));
}
- public String readline(int max) {
+ public PyString readline(int max) {
return file_readline(max);
}
- public String readline() {
+ public PyString readline() {
return file_readline(-1);
}
diff -r 2cb7e7b8f4a8 src/org/python/core/PyFunction.java
--- a/src/org/python/core/PyFunction.java Sat Sep 13 18:50:40 2008 -0400
+++ b/src/org/python/core/PyFunction.java Sun Sep 21 13:05:09 2008 -0400
@@ -143,13 +143,13 @@
}
@ExposedGet(name = "func_name")
- public String getFuncName() {
- return __name__;
+ public PyString getFuncName() {
+ return new PyString(__name__);
}
@ExposedSet(name = "func_name")
- public void setFuncName(String func_name) {
- __name__ = func_name;
+ public void setFuncName(PyString func_name) {
+ __name__ = func_name.asString();
}
@ExposedGet(name = "func_doc")
diff -r 2cb7e7b8f4a8 src/org/python/core/PyString.java
--- a/src/org/python/core/PyString.java Sat Sep 13 18:50:40 2008 -0400
+++ b/src/org/python/core/PyString.java Sun Sep 21 13:05:10 2008 -0400
@@ -46,7 +46,7 @@
PyString(StringBuilder buffer) {
this(TYPE, new String(buffer));
}
-
+
/**
* Creates a PyString from an already interned String. Just means it won't
* be reinterned if used in a place that requires interned Strings.
@@ -83,11 +83,11 @@
}
return codePoints;
}
-
+
public String substring(int start, int end) {
return string.substring(start, end);
}
-
+
public PyString __str__() {
return str___str__();
}
@@ -126,7 +126,7 @@
final String str_toString() {
return toString();
}
-
+
public String internedString() {
if (interned)
return string;
@@ -223,7 +223,7 @@
private static ucnhashAPI pucnHash = null;
-
+
public static String decode_UnicodeEscape(String str,
int start,
int end,
@@ -479,7 +479,7 @@
}
return ret;
}
-
+
@ExposedMethod(defaults = "null")
final PyObject str___getslice__(PyObject start, PyObject stop, PyObject step) {
return seq___getslice__(start, stop, step);
@@ -521,7 +521,7 @@
return null;
return string.equals(s) ? Py.False : Py.True;
}
-
+
public PyObject __lt__(PyObject other) {
return str___lt__(other);
}
@@ -645,8 +645,8 @@
protected PyString createInstance(String str, boolean isBasic) {
// ignore isBasic, doesn't apply to PyString, just PyUnicode
return new PyString(str);
- }
-
+ }
+
public boolean __contains__(PyObject o) {
return str___contains__(o);
}
@@ -690,7 +690,7 @@
}
return repeat(o.asIndex(Py.OverflowError));
}
-
+
@Override
public PyObject __rmul__(PyObject o) {
return str___rmul__(o);
@@ -707,7 +707,7 @@
public PyObject __add__(PyObject generic_other) {
return str___add__(generic_other);
}
-
+
@ExposedMethod(type = MethodType.BINARY)
final PyObject str___add__(PyObject generic_other) {
if (generic_other instanceof PyString) {
@@ -733,7 +733,7 @@
public PyObject __mod__(PyObject other) {
return str___mod__(other);
}
-
+
@ExposedMethod
public PyObject str___mod__(PyObject other){
StringFormatter fmt = new StringFormatter(string, false);
@@ -844,7 +844,7 @@
int end = endDouble(string, s);
z = Double.valueOf(string.substring(s, end)).doubleValue();
if (z == Double.POSITIVE_INFINITY) {
- throw Py.ValueError(String.format("float() out of range: %.150s", string));
+ throw Py.ValueError(String.format("float() out of range: %.150s", string));
}
s=end;
@@ -904,7 +904,7 @@
public String lower() {
return str_lower();
}
-
+
@ExposedMethod
final String str_lower() {
return string.toLowerCase();
@@ -1005,7 +1005,7 @@
public String lstrip() {
return str_lstrip(null);
}
-
+
public String lstrip(String sep) {
return str_lstrip(sep);
}
@@ -1028,7 +1028,7 @@
public String rstrip(String sep) {
return str_rstrip(sep);
}
-
+
@ExposedMethod(defaults = "null")
final String str_rstrip(String sep) {
char[] chars = string.toCharArray();
@@ -1427,7 +1427,7 @@
public int count(String sub, int start, int end) {
return str_count(sub, start, Py.newInteger(end));
}
-
+
@ExposedMethod(defaults = {"0", "null"})
final int str_count(String sub, int start, PyObject end) {
int[] indices = translateIndices(start, end);
@@ -1518,7 +1518,7 @@
if (lowSval.equals("nan")) return Double.NaN;
else if (lowSval.equals("inf")) return Double.POSITIVE_INFINITY;
else if (lowSval.equals("-inf")) return Double.NEGATIVE_INFINITY;
-
+
if (lowSval.endsWith("d") || lowSval.endsWith("f")) {
throw new NumberFormatException("format specifiers not allowed");
}
@@ -1640,10 +1640,10 @@
// if the base >= 22, then an 'l' or 'L' is a digit!
if (base < 22 && e > b && (str.charAt(e-1) == 'L' || str.charAt(e-1) == 'l'))
e--;
-
+
if (b > 0 || e < str.length())
str = str.substring(b, e);
-
+
try {
java.math.BigInteger bi = null;
if (sign == '-')
@@ -1682,7 +1682,7 @@
}
return fillchar.charAt(0);
}
-
+
public String ljust(int width) {
return str_ljust(width, null);
}
@@ -1690,7 +1690,7 @@
public String ljust(int width, String padding) {
return str_ljust(width, padding);
}
-
+
@ExposedMethod(defaults="null")
final String str_ljust(int width, String fillchar) {
char pad = parse_fillchar("ljust", fillchar);
@@ -1726,7 +1726,7 @@
int half = n/2;
if (n%2 > 0 && width%2 > 0)
half += 1;
-
+
return padding(half, pad)+string+padding(n-half, pad);
}
@@ -1815,7 +1815,7 @@
return replace((PyString)oldPiece, (PyString)newPiece, maxsplit == null ? -1 : maxsplit.asInt());
}
-
+
protected PyString replace(PyString oldPiece, PyString newPiece, int maxsplit) {
int len = string.length();
int old_len = oldPiece.string.length();
@@ -1825,7 +1825,7 @@
}
return createInstance(string, true);
}
-
+
if (old_len == 0 && newPiece.string.length() != 0 && maxsplit !=0) {
// old="" and new != "", interleave new piece with each char in original, taking in effect maxsplit
StringBuilder buffer = new StringBuilder();
@@ -1838,7 +1838,7 @@
buffer.append(string.substring(i));
return createInstance(buffer.toString(), true);
}
-
+
if(maxsplit == -1) {
if(old_len == 0) {
maxsplit = len + 1;
@@ -1846,7 +1846,7 @@
maxsplit = len;
}
}
-
+
return newPiece.str_join(splitfields(oldPiece.string, maxsplit));
}
@@ -1923,30 +1923,30 @@
@ExposedMethod(defaults = {"0", "null"})
final boolean str_startswith(PyObject prefix, int start, PyObject end) {
int[] indices = translateIndices(start, end);
-
+
if (prefix instanceof PyString) {
- String strPrefix = ((PyString)prefix).string;
+ String strPrefix = ((PyString)prefix).string;
if (indices[1] - indices[0] < strPrefix.length())
return false;
-
- return string.startsWith(strPrefix, indices[0]);
+
+ return string.startsWith(strPrefix, indices[0]);
} else if (prefix instanceof PyTuple) {
- PyObject[] prefixes = ((PyTuple)prefix).getArray();
-
- for (int i = 0 ; i < prefixes.length ; i++) {
- if (!(prefixes[i] instanceof PyString))
- throw Py.TypeError("expected a character buffer object");
+ PyObject[] prefixes = ((PyTuple)prefix).getArray();
- String strPrefix = ((PyString)prefixes[i]).string;
+ for (int i = 0 ; i < prefixes.length ; i++) {
+ if (!(prefixes[i] instanceof PyString))
+ throw Py.TypeError("expected a character buffer object");
+
+ String strPrefix = ((PyString)prefixes[i]).string;
if (indices[1] - indices[0] < strPrefix.length())
- continue;
-
- if (string.startsWith(strPrefix, indices[0]))
- return true;
- }
- return false;
+ continue;
+
+ if (string.startsWith(strPrefix, indices[0]))
+ return true;
+ }
+ return false;
} else {
- throw Py.TypeError("expected a character buffer object or tuple");
+ throw Py.TypeError("expected a character buffer object or tuple");
}
}
@@ -1968,31 +1968,31 @@
String substr = string.substring(indices[0], indices[1]);
if (suffix instanceof PyString) {
- return substr.endsWith(((PyString)suffix).string);
+ return substr.endsWith(((PyString)suffix).string);
} else if (suffix instanceof PyTuple) {
- PyObject[] suffixes = ((PyTuple)suffix).getArray();
-
- for (int i = 0 ; i < suffixes.length ; i++) {
- if (!(suffixes[i] instanceof PyString))
- throw Py.TypeError("expected a character buffer object");
+ PyObject[] suffixes = ((PyTuple)suffix).getArray();
- if (substr.endsWith(((PyString)suffixes[i]).string))
- return true;
- }
- return false;
+ for (int i = 0 ; i < suffixes.length ; i++) {
+ if (!(suffixes[i] instanceof PyString))
+ throw Py.TypeError("expected a character buffer object");
+
+ if (substr.endsWith(((PyString)suffixes[i]).string))
+ return true;
+ }
+ return false;
} else {
- throw Py.TypeError("expected a character buffer object or tuple");
+ throw Py.TypeError("expected a character buffer object or tuple");
}
- }
+ }
/**
* Turns the possibly negative Python slice start and end into valid indices
* into this string.
- *
+ *
* @return a 2 element array of indices into this string describing a
* substring from [0] to [1]. [0] <= [1], [0] >= 0 and [1] <=
* string.length()
- *
+ *
*/
protected int[] translateIndices(int start, PyObject end) {
int iEnd;
@@ -2501,7 +2501,7 @@
// A magic number. Larger than in CPython.
throw Py.OverflowError("formatted " + type + " is too long (precision too long?)");
}
-
+
}
private String formatLong(PyObject arg, char type, boolean altFlag) {
@@ -2886,7 +2886,7 @@
string = formatFloatExponential(arg, c, false);
break;
case 'f':
- case 'F':
+ case 'F':
string = formatFloatDecimal(arg, false);
// if (altFlag && string.indexOf('.') == -1)
// string += '.';
diff -r 2cb7e7b8f4a8 src/org/python/core/PyStringMap.java
--- a/src/org/python/core/PyStringMap.java Sat Sep 13 18:50:40 2008 -0400
+++ b/src/org/python/core/PyStringMap.java Sun Sep 21 13:05:10 2008 -0400
@@ -141,7 +141,9 @@
for (Entry