QUIZ_PYTHON Telegram 3960
При сравнении b == a, где b — это список, а a — это экземпляр MyList, интерпретатор сначала вызывает list.__eq__(b, a), и если результат — NotImplemented, тогда он вызывает MyList.__eq__(a, b).

Так как MyList.__eq__ определён и всегда возвращает True, то сравнения b == a возвращаетт True.



tgoop.com/quiz_python/3960
Create:
Last Update:

При сравнении b == a, где b — это список, а a — это экземпляр MyList, интерпретатор сначала вызывает list.__eq__(b, a), и если результат — NotImplemented, тогда он вызывает MyList.__eq__(a, b).

Так как MyList.__eq__ определён и всегда возвращает True, то сравнения b == a возвращаетт True.

BY Python: задачки и вопросы


Share with your friend now:
tgoop.com/quiz_python/3960

View MORE
Open in Telegram


Telegram News

Date: |

Developing social channels based on exchanging a single message isn’t exactly new, of course. Back in 2014, the “Yo” app was launched with the sole purpose of enabling users to send each other the greeting “Yo.” Matt Hussey, editorial director of NEAR Protocol (and former editor-in-chief of Decrypt) responded to the news of the Telegram group with “#meIRL.” It’s easy to create a Telegram channel via desktop app or mobile app (for Android and iOS): Image: Telegram. To delete a channel with over 1,000 subscribers, you need to contact user support
from us


Telegram Python: задачки и вопросы
FROM American