Created
August 29, 2017 15:27
-
-
Save psicobyte/16e1914f671e750f5f74c3bc34f36dba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# Métodos "privados" | |
class MiClase: | |
variable_a_nivel_de_clase = "cosa" | |
def __init__(self,texto): | |
self.nombre = texto | |
def metodo(self): | |
print(self.variable_a_nivel_de_clase) | |
cosa = MiClase("Hola") | |
cosa.metodo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment