QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 115

What relationship does == normally ask a type to evaluate?

  1. Whether both operands occupy adjacent memory
  2. Whether both names were assigned on the same line
  3. Whether the operands are equal according to their type's value semanticsՃիշտ պատասխան
  4. Whether both references designate one object

Բացատրություն

The equality operator invokes the type's value-comparison semantics, allowing distinct objects to compare equal. It is not restricted to checking whether two references designate one object or share a memory address.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 115: What relationship does == normally ask a type to evaluate? · Python Fundamentals · Questena