Zanurkuj w Pythonie/Tworzenie oddzielnych funkcji obsługi względem typu węzła: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Piotr (dyskusja | edycje)
m Nowa strona: {{Python/Do tłumaczenia}} {{Podświetl|py}} == Creating separate handlers by node type == The third useful XML processing tip involves separating your code into logical functions, ba...
 
Piotr (dyskusja | edycje)
mNie podano opisu zmian
Linia 60:
 
In this example, the dispatch functions parse and parse_Element simply find other methods in the same class. If your processing is very complex (or you have many different tag names), you could break up your code into separate modules, and use dynamic importing to import each module and call whatever functions you needed. Dynamic importing will be discussed in Chapter 16, Functional Programming.
 
<noinclude>
{{ProstaNawigacja|
poprzart=Python/Odnajdywanie bezpośrednich dzieci węzła|
poprz=Odnajdywanie bezpośrednich dzieci węzła|
spis=Python|
nastart=Python/Obsługa argumentów polecenia|
nast=Obsługa argumentów polecenia}}
</noinclude>