Zanurkuj w Pythonie/Metody specjalne: Różnice pomiędzy wersjami
Usunięta treść Dodana treść
m wymaga formatowania |
mNie podano opisu zmian |
||
Linia 77:
2 Now the real fun begins. Setting the name key of mp3file triggers the __setitem__ method on MP3FileInfo (not UserDict), which notices that you're setting the name key with a real value and calls self.__parse. Although you haven't traced through the __parse method yet, you can see from the output that it sets several other keys: album, artist, genre, title, year, and comment.
3 Modifying the name key will go through the same process again: Python calls __setitem__, which calls self.__parse, which sets all the other keys.
<noinclude>
{{ProstaNawigacja|
poprzart=Python:Interaktywna powłoka|
poprz=Interaktywna powłoka|
spis=Python|
nastart=Python:Twój pierwszy program|
nast=Twój pierwszy program}}
[[Kategoria:Python]]
</noinclude>
|