Message2012
Hello,
I discovered a bug in the sort()-method for sequences.
I run the following skript on Jython 2.2.1 and Python 2.5:
filename1="e:\\daten\\slsrpt\\OUT\\asciitest_slsrpt\\slsrpt4562.txt"
f = open(filename1, "r")
lines = f.readlines()
f.close()
lines.sort()
f = open("bug_jy_sort_test.txt", "w")
f.writelines(lines)
f.close()
I compared the written file with diff and get that line 903 has a difference. The file written with Jython contains a line a second time and has dropped the line that should be in that position.
The output of the diff-command is:
$ diff bug_jy_sort_test.txt_2_2_1 bug_jy_sort_test.txt
903c903
< 200;73E;4047700000004;4314125000002;0000099;4314122749881;;4047700002756;;0257158;;;;ALP. COLA-WEIZEN 4X6X0,3;;;;;;;;;;;;;;;;;1;STK;;;;;;;;;;;;;;01.06.2007;;30.06.2007;;;;;;;;
---
> 200;73E;4047700000004;4314125000002;0000099;4314122749881;;4047700002954;;0021960;;;;ALP. KLEINER MOENCH 4X6X0;;;;;;;;;;;;;;;;;1;STK;;;;;;;;;;;;;;01.06.2007;;30.06.2007;;;;;;;;
The problem is, I cannot provide the whole file as it contains confidential data. It has 1148 lines and its size is 202654 bytes.
The bug is not in jython 2.1. |
|
Date |
User |
Action |
Args |
2008-02-20 17:18:07 | admin | link | issue1835099 messages |
2008-02-20 17:18:07 | admin | create | |
|