Skip to content

Instantly share code, notes, and snippets.

@aduartem
Last active August 29, 2016 03:37
Show Gist options
  • Save aduartem/6493f0a8ebd0f53924ea to your computer and use it in GitHub Desktop.
Save aduartem/6493f0a8ebd0f53924ea to your computer and use it in GitHub Desktop.
Python - Herencia múltiple
#!/usr/bin/python
"""Ejemplo extraido desde el libro Python para todos de Raul Gonzalez Duque"""
class Terrestre:
def desplazar(self):
print "El animal anda"
class Acuatico:
def desplazar(self):
print "El animal nada"
class Cocodrilo(Terrestre, Acuatico):
pass
c = Cocodrilo()
c.desplazar()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment