· 3 min read

Master Python OOP in Spanish: 59 Flashcards on Clases, Herencia and Métodos Mágicos

Learn Python object-oriented programming with Spanish explanations: 59 real flashcards on clases, herencia, MRO, métodos mágicos and the Spanish terms to know.

Blue and yellow python snake coiled around tiled building blocks 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 NT0395 – Python: Fundamentos de POO is the Spanish edition of our English Python OOP deck: the same 59 concepts, with the Python term on the front and a Spanish explanation on the back. It is built for students taking programación orientada a objetos in Spanish, or developers who read docs in English but explain code to Spanish-speaking teams.

Study this deck: Python: Fundamentos de POO

1 / 10
Question

Class in Python

Knew itLearning

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

What the Spanish backs actually say

FrontBack (real card)
Class in PythonUn molde para crear objetos que agrupa datos (atributos) y funcionalidad (métodos).
SelfReferencia a la instancia actual… Es una convención, no una palabra clave.
Method overridingLa clase hija redefine un método de la clase padre… Se puede llamar a la versión del padre con super().
MROOrden en el que Python busca métodos en la jerarquía de herencia… Usa la linealización C3.
Name mangling__attribute se convierte en _ClassName__attribute… No es una medida de seguridad.
__enter__ and __exit__Métodos de gestor de contexto para la sentencia 'with'.
__bool__Define la veracidad (truthiness) de un objeto.
Composition over inheritancePreferir la composición de objetos (tiene-un) frente a la herencia de clases (es-un).
Slots in Python classes__slots__ … ahorra memoria y acelera el acceso a atributos. No hay __dict__.

The full map

Clases e instancias, self, __init__, atributos de instancia vs atributos de clase, métodos de instancia, @classmethod (cls), @staticmethod, herencia, herencia múltiple, super(), MRO, polimorfismo, duck typing, encapsulamiento, atributos privados, name mangling, @property and setters, métodos mágicos (__str__, __repr__, __len__, __getitem__, __setitem__, __eq__, __add__, __call__, __iter__, __next__, __hash__, __bool__, __del__), isinstance(), issubclass(), getattr/setattr/hasattr/delattr, __dict__, __class__, clases base abstractas (ABC), __new__ vs __init__, @dataclass, singleton, method chaining (interfaces fluidas), descriptores, __getattr__ vs __getattribute__, metaclases.

Spanish vocabulary traps

  • Sobrescritura ≠ sobrecarga. The card says redefine; most Spanish courses call overriding sobrescritura de métodos. Sobrecarga is overloading, which Python does not have (the last def wins). Add both words to the back so exam wording doesn't throw you.
  • Sentencia = statement, not "sentence": la sentencia 'with'. Same false friend as in our Spanish built-in functions article.
  • Glossary worth one extra card: molde (template), clase hija/padre, gestor de contexto, recolector de basura (the deck leaves "garbage collector" in English), veracidad (truthiness).

Three cards to rewrite

  1. Card 46 (ABC): an ABC can't be instantiated only while it still has an @abstractmethod. Add that condition.
  2. Card 54 (__hash__): the missing rule is the useful one — si defines __eq__ sin __hash__, Python pone __hash__ = None and your objects can't go in a set.
  3. Card 50 (singleton): hasattr(cls, 'instance') is inherited, so a subclass returns the parent's instance. Fine for revision, not for production.

Also restore Python's casing on the fronts (self, super(), isinstance(), getattr(), type()): the deck capitalised them, and you should never type them that way.

Learning in French instead? See the French edition. Search NT0395 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