【问题标题】:What does the Python operator ilshift (<<=)?Python 运算符 ilshift (<<=) 是什么?
【发布时间】:2016-10-17 21:51:30
【问题描述】:

Python 运算符 ilshift (

https://docs.python.org/2/library/operator.html#operator.ilshift

http://www.pythonlake.com/python/operators/operatorilshift

在文档中找不到关于它的作用的信息。

【问题讨论】:

  • 不清楚你的问题是什么......它在“就地左移”运算符中。你的问题到底是什么?
  • 您是在问&lt;&lt;= 运算符是做什么的吗?
  • “我在哪里可以找到有关此的信息?” - 在您刚刚写的问题中链接到的文档中?
  • 你是什么意思,“什么使”?它是 python 的一部分...

标签: python


【解决方案1】:

它是一个 BitwiseOperators(按位右移): https://wiki.python.org/moin/BitwiseOperators

所有这些运算符都有一个共同点——它们是“按位”的 运营商。也就是说,它们(通常)对数字进行操作,而不是 将该数字视为单个值,他们将其视为 它是一串位,以二进制补码形式编写。

更多信息:

https://www.tutorialspoint.com/python/bitwise_operators_example.htm

What does a bitwise shift (left or right) do and what is it used for?

【讨论】:

    猜你喜欢
    • 2015-05-28
    • 1970-01-01
    • 2022-01-16
    • 2012-05-11
    • 2013-07-31
    • 1970-01-01
    • 1970-01-01
    • 2010-09-21
    相关资源
    最近更新 更多