Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

351
Vistas
Is object() == object() guaranteed to be False?

Suppose I create two instances of class object. Are these two instances guaranteed to be not equal to each other? In other words, is object() == object() guaranteed to be False, or is it implementation-dependent?

I understand that object() is object() is guaranteed to be False, but here I am asking about object() == object().

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Yes it is guaranteed that object() == object() is False because it is documented that "by default, object implements __eq__() by using is".

over 4 years ago · Santiago Trujillo Denunciar

0

Each Python 3.x release is intended to be backward-compatible with previous 3.x releases. As it's the base class, changing the comparison behavior of object would break this backward compatibility promise. So I think you can rely on it, but if we knew what you're trying to do that requires this invariant, we could probably give better advice.

You can always use assert to make sure it continues to be true.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda