Intermediate Python - Fluent Python, video 4

preview_player
Показать описание
Another in a series following along in the book Fluent Python. This video continues the tuple discussion, how to use them and their benefits.

Рекомендации по теме
Комментарии
Автор

Not every mutable data type implements the .append() method. Dictionaries are mutable, but they don't have an append method. A general rule of thumb to check if an object is mutable would be to try and get its hash value using the hash() function. e.g., hash(object). Don't rely on whether it implements the append method or not because that doesn't tell you anything.

tyrpert
welcome to shbcf.ru