Created
January 24, 2011 05:12
-
-
Save FernandoEscher/792865 to your computer and use it in GitHub Desktop.
Atributos dinámicos en Python
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
class Dummy(object): | |
def __getattribute__(self, name): | |
f = lambda: 'hola con %s'%name | |
return f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mucho relajo guardar todas las urls de los gists, mejor esto: http://escolarea.codepad.org/