Title: Discrepancy in bin(-num) output
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, santa4nt
Priority: normal Keywords: patch

Created on 2013-03-19.15:53:12 by santa4nt, last changed 2013-03-22.18:57:14 by fwierzbicki.

File name Uploaded Description Edit Remove
issue2027.patch santa4nt, 2013-03-20.02:15:44
msg7942 (view) Author: Santoso Wijaya (santa4nt) Date: 2013-03-19.15:53:12
Comparing Cpython and Jython:

xxx:~/jython$ python
Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> '{:#b}'.format(-16)
>>> bin(-16)

xxx:~/jython$ ./dist/bin/jython
Jython 2.7b1+ (default:bbd6c6d64b52, Mar 19 2013, 08:43:06) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_17
Type "help", "copyright", "credits" or "license" for more information.
>>> '{:#b}'.format(-16)
>>> bin(-16)
msg7943 (view) Author: Santoso Wijaya (santa4nt) Date: 2013-03-20.02:15:44
Attaching a patch to fix, and re-enable the unit test that should have caught this to begin with.
msg7960 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-03-22.18:57:01
Applied in thanks Santoso Wijaya!
Date User Action Args
2013-03-22 18:57:14fwierzbickisetstatus: open -> closed
resolution: fixed
2013-03-22 18:57:01fwierzbickisetmessages: + msg7960
2013-03-22 17:53:28fwierzbickisetpriority: normal
assignee: fwierzbicki
nosy: + fwierzbicki
2013-03-20 02:15:45santa4ntsetfiles: + issue2027.patch
keywords: + patch
messages: + msg7943
2013-03-19 15:53:12santa4ntcreate