This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author francismb
Recipients Arfrever, francismb, jcea, mark.dickinson, pitrou, python-dev, r.david.murray, rhettinger, serhiy.storchaka, vstinner
Date 2014-05-12.21:04:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399928689.57.0.582972770646.issue21422@psf.upfronthosting.co.za>
In-reply-to
Content
I Victor you were so fast, I started with one patch also in bool (at least the place was right). The problem is that I was getting some extrage (for me at least). As far I hat:

    def test_shifted_true(self):
    	with self.assertRaises(ValueError):
    	    True << -1
    	self.assertIs(True << 0, 1)
    	self.assertIs(True << 1, 2)
    	self.assertEqual(True << 63, 1 << 63)
    	self.assertIs(True << 63, 1 << 63)

And I'm getting:


======================================================================
FAIL: test_shifted_true (test.test_bool.BoolTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ci/Prog/cpython/src/Lib/test/test_bool.py", line 349, in test_shifted_true
    self.assertIs(True << 63, 1 << 63)
AssertionError: 9223372036854775808 is not 9223372036854775808

----------------------------------------------------------------------

That's:
./python --version
Python 3.5.0a0

>>> type(True<<63)
<class 'int'>
>>> type(1<<63)
<class 'int'>

hg tip
changeset:   90664:4e33c343a264

What I'm doing wrong?
That's:
./python --version
Python 3.5.0a0

>>> type(True<<63)
<class 'int'>
>>> type(1<<63)
<class 'int'>

hg tip
changeset:   90664:4e33c343a264

What I was doing wrong?

Thanks in advance!
francis
History
Date User Action Args
2014-05-12 21:04:49francismbsetrecipients: + francismb, rhettinger, jcea, mark.dickinson, pitrou, vstinner, Arfrever, r.david.murray, python-dev, serhiy.storchaka
2014-05-12 21:04:49francismbsetmessageid: <1399928689.57.0.582972770646.issue21422@psf.upfronthosting.co.za>
2014-05-12 21:04:49francismblinkissue21422 messages
2014-05-12 21:04:49francismbcreate