Stefan Krah added the comment:

To expand on what Mark said:  If the proposed format code implicitly
gives these results ...


>>> format(12 % 2**8, '08b')
'00001100'
>>> format(-12 % 2**8, '08b')
'11110100'

..., would students not expect that these two operations have the same
result?

>>> 0b11110100 | 0b00001100
252
>>> 
>>> -12 | 12
-4

----------
nosy: +skrah

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30571>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to