From: Peter <re...@bu...> - 2014-05-07 17:11:12
|
New submission from Peter: Arguably object comparison (using "is") of strings is perhaps expected to be implementation dependant, but this could be viewed as a regression from Jython 2.5: C Python: $ python Python 2.7.5 (default, Aug 25 2013, 00:04:04) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> "a" is "a" True >>> quit() $ pypy2.2 Python 2.7.3 (87aa9de10f9c, Nov 24 2013, 20:57:21) [PyPy 2.2.1 with GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``the zen attitude to programming: reducing the oopses in your life'' >>>> "a" is "a" True >>>> quit() Jython 2.5 $ jython2.5 Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) [Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_65 Type "help", "copyright", "credits" or "license" for more information. >>> "a" is "a" True >>> quit() Jython 2.7 beta 2: $ jython2.7 "a" Jython 2.7b2 (default:a5bc0032cf79+, Apr 22 2014, 21:20:17) [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_55 Type "help", "copyright", "credits" or "license" for more information. >>> "a" is "a" False >>> 4 is 4 True >>> quit() All tests show above were on Mac OS X. ---------- messages: 8342 nosy: pjac severity: normal status: open title: Object comparison of strings fails, "a" is "a" gives false _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue2137> _______________________________________ |