Skip to content

Instantly share code, notes, and snippets.

@FernandoEscher
Created January 24, 2011 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FernandoEscher/792865 to your computer and use it in GitHub Desktop.
Save FernandoEscher/792865 to your computer and use it in GitHub Desktop.
Atributos dinámicos en Python
class Dummy(object):
def __getattribute__(self, name):
f = lambda: 'hola con %s'%name
return f
@FernandoEscher
Copy link
Author

Excelente! Deberíamos de tener gists de todas las loqueras que nos ponemos a probar! :P

@lfborjas
Copy link

Mucho relajo guardar todas las urls de los gists, mejor esto: http://escolarea.codepad.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment