Skip to content

Instantly share code, notes, and snippets.

@fermuch
Created August 24, 2011 00:49
Show Gist options
  • Save fermuch/1167034 to your computer and use it in GitHub Desktop.
Save fermuch/1167034 to your computer and use it in GitHub Desktop.
class MiClase:
a = 0
b = 13
def asd (b):
b = b
self.a = b
return self.a + " y " + self.b
c = MiClase
x = c.asd(10)
print x
'''
Devuelve:
10 y 13
Por que?
La variable b nunca se choca con la variable interna (self) b.
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment