New submission from vadim suvorov <[EMAIL PROTECTED]>: The result of the attached script execution is extremely unstable. The change in the print statement in line 146 from 'print "1"' to 'print 1' (string literal to numerical) changes the result of execution to the correct (presumably) one. The results are also affected by commenting out calls to empty method in lines 143 or 227. The use of dis.dis() affects results of the execution as well. More than, the location of error (the triggered assert) shifts in the code, or it is possible that an Exception is raised.
The script was tested in Python 2.5.2 in Windows XP SP2 and SP3, 2.6beta2 in Windows XP SP3 and in 2.5.2 Ubuntu 8.0.4 with consistent results. (I mean that behavior of the script is changed by calling of empty methods or irrelevant print statements. The assert shifts.) Sorry for the long script. I failed to further reduce its size because effect disappears. Expected output: ~~~~~~~~~~~~~~~~~~~~~ 1 1 1 1 1 1 1 1 1 1 1 1 Congratulations: grid solved! 1 2 3 4 5 6 7 8 910 1 B B B B B . B . . B 2 . B . . B B B B . B 3 . . . . . B B . B B 4 . . . B B B B B B . 5 B . B B B . . B B B ~~~~~~~~~~~~~~~~~~~~~ Received output (example): ~~~~~~~~~~~~~~~~~~~~~ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Traceback (most recent call last): File "E:\pet projects\nonograms\nonogramsolver10.py", line 244, in <module> g.solve() File "E:\pet projects\nonograms\nonogramsolver10.py", line 230, in solve seq.simplescan() File "E:\pet projects\nonograms\nonogramsolver10.py", line 99, in simplescan assert self.clues, "a seq with no clues" AssertionError: a seq with no clues ~~~~~~~~~~~~~~~~~~~~~ ---------- components: Interpreter Core files: nonogramsolver10.py messages: 70658 nosy: bad severity: normal status: open title: a bug in the interpreter? type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file11045/nonogramsolver10.py _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3497> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com