it:programmiersprache:python:strukturen

Dies ist eine alte Version des Dokuments!


Python Strukturen

  • Verzweigung – if, else
  • Auswahl – match, case (ab Python 3.10, PEP 634, PEP 635, PEP 636)
  • Schleifen – For, while, else
  • Schleifen comprehension – y = x for x = …
  • Ausnahmebehandlung (Exceptions) - try/except/finally/else
  • with → Klassen (Context-Manager-Konzept)
  • Generatoren → yield
  • Iteratoren → Klassen (Iterator-Konzept)
  • Funktionen
    • Funktionen: *args, **kwargs
    • Funktionen: erzwingen von Keyword Argumenten f(a, /, b) (ab ?, PEP 457)
    • Funktionen: erzwingen von Positionsargumenten f(a, /, b, *, c) (ab Python 3.8 - PEP 570)
    • Funktionen: überladen
    • Funktionen: Dekoratoren (Decorator)
    • Funktionen: Magische Funktionen → Klassen
    • Funktionen: Properties (nosetest, nose2)
    • Funktionen: das '*' an Funktionsnamen :?:
    • None vs. Exception
  • Module
  • Package
  • it/programmiersprache/python/strukturen.1789289047.txt.gz
  • Zuletzt geändert: 13.09.2026 08:44
  • von marsch