· 2 min read

Learn Python OOP in German: 59 Flashcards on Klassen, Vererbung and Magische Methoden

Study Python OOP with German explanations: 59 real flashcards on Klassen, Vererbung, MRO, Kapselung and dunder methods, plus 4 cards to fix and überschreiben vs überladen.

Python snake coiled around three linked cubes forming an inheritance tree, with a gear and a golden key, among floating flashcards

Studying. But it's also a video game. 🎮

Flashcards, quizzes and games that make you actually remember.

Start playing — it's free

Posted by

Deck BL6183 – Python: Grundlagen der OOP is the German edition of our Python OOP deck: the same 59 cards, English term on the front, German explanation on the back. It suits Fachinformatiker trainees, Informatik students with German lecture slides, and anyone who has to explain classes in German at an interview.

Study this deck: Python: Grundlagen der OOP

1 / 10
Question

Class in Python

Knew itLearning

Tap the card for the answer · swipe right if you knew it, left if not

Eight cards from the deck

FrontBack (German, as in the deck)
InstanceEin aus einer Klasse erzeugtes Objekt. Jede Instanz hat eigene Daten, teilt sich aber die Methoden
Class attributesVariablen, die von allen Instanzen einer Klasse gemeinsam genutzt werden
Method overridingDie Kindklasse definiert eine Methode der Elternklasse neu
MRO (Method Resolution Order)Die Reihenfolge, in der Python Methoden in der Vererbungshierarchie sucht … C3-Linearisierung
Name mangling__attribute wird zu _ClassName__attribute … reine Konvention
__str__ vs __repr____str__: für Endnutzer lesbar. __repr__: eindeutig, für Entwickler und Debugging
__new__ vs __init____new__ erstellt die Instanz, __init__ initialisiert sie
Composition over inheritanceObjektkomposition (hat-ein) wird der Klassenvererbung (ist-ein) vorgezogen

Was die 59 Karten abdecken

Klassen, Instanzen, self, __init__, Instanz- vs Klassenattribute, @classmethod, @staticmethod, Vererbung, super(), Mehrfachvererbung, MRO, Polymorphie, Duck Typing, Kapselung, private Attribute, Name Mangling, @property mit Setter, __str__/__repr__, __len__, __getitem__/__setitem__, Vergleichsmethoden (__eq__ bis __ge__), __add__, __call__, __iter__/__next__, Context Manager (__enter__/__exit__), isinstance(), issubclass(), getattr/setattr/delattr/hasattr, __dict__, __class__, ABC und @abstractmethod, @dataclass, Singleton, Method Chaining, __del__, __hash__, __bool__, Deskriptoren, __slots__, __getattr__ vs __getattribute__, Metaklassen.

Vier Karten nachbessern

  • Card 5 calls __init__ the Konstruktormethode, while card 48 correctly says __new__ creates the object. Write Initialisierer on card 5 so the two cards agree.
  • Card 46: a subclass of ABC only refuses instantiation if it still has an unimplemented @abstractmethod. Add that condition.
  • Card 54: defining __eq__ without __hash__ sets __hash__ to None, so your objects silently stop working in sets and as dict keys. That is the fact worth drilling.
  • Card 50: the hasattr(cls, 'instance') singleton is inherited by subclasses and re-runs __init__ on every call. Keep it as a pattern card, not as a recipe.

Also restore the casing of the sentence-cased fronts: self, super(), isinstance(), getattr() are lowercase in real code.

Tip: überschreiben ist nicht überladen

German textbooks pair two words English learners mix up: überschreiben (overriding, card 13: same signature, redefined in the Kindklasse) and überladen (overloading: same name, different parameters). Python has no classic overloading; the closest tools are functools.singledispatch and typing.overload. Add one card for each word, and one for the synonym pairs Elternklasse/Oberklasse/Basisklasse and Kindklasse/Unterklasse, since exams and docs switch between them.

The French and Spanish editions have their own write-ups, e.g. Python OOP in French. Find BL6183 in the library on Flip It.

Ready to learn faster? 🚀

Join FLIP IT for free and turn studying into a game.

Create my free account