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 Nandish
Recipients Nandish, eric.smith
Date 2020-12-22.19:35:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CANiJTZSei5OvmSobK3AomOEQMruaDXTsSUQttVq8ox4GBNsDzg@mail.gmail.com>
In-reply-to <1608665068.87.0.46619029504.issue42720@roundup.psfhosted.org>
Content
I took print(100>>3), I dropped last 3 bits and added value ‘0’ to first 3
bits. Both manual calculation and python result was correct.

How can << shit operator and >> shit operator work differently , with
different logic ?

Thanks
Nandish

On Wed, Dec 23, 2020 at 12:54 AM Eric V. Smith <report@bugs.python.org>
wrote:

>
> Eric V. Smith <eric@trueblade.com> added the comment:
>
> Why do you think the first 3 bits should be dropped? That's not the
> documented behavior of <<.
>
> ----------
> nosy: +eric.smith
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue42720>
> _______________________________________
>
History
Date User Action Args
2020-12-22 19:35:07Nandishsetrecipients: + Nandish, eric.smith
2020-12-22 19:35:07Nandishlinkissue42720 messages
2020-12-22 19:35:07Nandishcreate