|
Bas de page | |
---|---|
Auteur | Sujet : [Résolu ]Opérateur de comparaison en python |
Anonymouse | Bonjour
Message cité 1 fois Message édité par Anonymouse le 05-04-2008 à 00:00:13 |
![]() Publicité | Posté le 19-02-2008 à 14:05:42 ![]() ![]() |
masklinn í dag viðrar vel til loftárása |
Tu peux les trouver dans la doc, reference > Data Model > Special Method Names Pour l'égalité, tu veux soit __eq__
note: en Python, "==" teste l'égalité, pas l'idéntité (testée avec l'opérateur "is" ). C'est juste que par défaut Python définit l'égalité comme étant l'identité s'il n'a pas plus d'infos Message cité 1 fois Message édité par masklinn le 19-02-2008 à 14:23:29 --------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
Anonymouse |
Message édité par Anonymouse le 19-02-2008 à 14:42:38 |
Anonymouse | Au fait est-ce que tu saurai si lorsque je crée deux objets identiques la référence aux deux objets ne sera pas la même?
Message cité 2 fois Message édité par Anonymouse le 20-02-2008 à 23:13:20 |
Sve@r |
--------------- Vous ne pouvez pas apporter la prospérité au pauvre en la retirant au riche. |
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
Anonymouse |
|
Sve@r |
--------------- Vous ne pouvez pas apporter la prospérité au pauvre en la retirant au riche. |
Anonymouse |
|
![]() Publicité | Posté le 06-04-2008 à 10:04:22 ![]() ![]() |
Sve@r |
--------------- Vous ne pouvez pas apporter la prospérité au pauvre en la retirant au riche. |